Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ParticleData
- {
- //public Color color = Color.White;
- public Particle.Property size;
- public Particle.Property rotation;
- public Particle.Property speed;
- public Particle.Property direction;
- public Texture2D sprite;
- public bool relativeRotation;
- public bool randomWiggle = true;
- public int lifeTime;
- private Color[] _color;
- public ParticleData(Color[] color, Particle.Property size, Particle.Property rotation,
- Particle.Property speed, Particle.Property direction, Texture2D sprite,
- bool relativeRotation, int lifeTime)
- {
- _color = color;
- this.size = size;
- this.rotation = rotation;
- this.speed = speed;
- this.direction = direction;
- this.sprite = sprite;
- this.relativeRotation = relativeRotation;
- this.lifeTime = lifeTime;
- }
- public ParticleData(Color[] color, Particle.Property size, Particle.Property rotation,
- Particle.Property speed, Particle.Property direction, Texture2D sprite,
- bool relativeRotation, int lifeTime, bool randomWiggle)
- {
- _color = color;
- this.size = size;
- this.rotation = rotation;
- this.speed = speed;
- this.direction = direction;
- this.sprite = sprite;
- this.relativeRotation = relativeRotation;
- this.lifeTime = lifeTime;
- this.randomWiggle = randomWiggle;
- }
- public Particle CreateParticle(Vector2 position)
- {
- Particle particle = new Particle(position, speed, direction, size, rotation, lifeTime, randomWiggle);
- particle.color = _color;
- particle.relativeRotation = relativeRotation;
- particle.sprite = sprite;
- return particle;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment