Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Particle
- {
- private Texture2D _sprite;
- //The sprite of the particle.
- public Texture2D sprite
- {
- get
- {
- return _sprite;
- }
- set
- {
- _sprite = value;
- rect = new Rectangle(0, 0, _sprite.Width, _sprite.Height);
- }
- }
- //Check if the particle should be removed.
- public bool remove
- {
- get
- {
- return _remove;
- }
- }
- private bool _remove = false;
- public static SpriteBatch spriteBatch; //The sprite batch where the particles will be drawn.
- public static GraphicsDeviceManager graphics; //
- private Rectangle rect; //The rectangle of the particle (to check if the particle is in the screen).
- public bool relativeRotation = true; //Rotation relatiove to direction.
- public Vector2 position; //Position.
- public Color[] color; //Array of colors.
- public bool randomWiggle = true; //Start with random wiggle
- private PropertyUpdater sizeUpdater; //Size
- private PropertyUpdater rotationUpdater; //Rotation
- private PropertyUpdater speedUpdater; //Speed
- private PropertyUpdater directionUpdater; //Direction
- private int timer; //Timer, to set the color and check if the particle should be removed.
- private int lifeTime; //Life time in seconds until the particle is removed.
- }
Advertisement
Add Comment
Please, Sign In to add comment