Exemple #1
0
 public Particle(ParticleEmitter Engine, Texture2D Image, Vector2 Position, Vector2 Velocity, int Life)
 {
     engine = Engine;
     position = Position;
     velocity = Velocity;
     if (Life < 0) { life = 0; }
     else { life = Life; }
     image = new Sprite();
     image.Position = Position;
     if (Image == null)
     {
         image.Texture = new Texture2D(XNAGame.Instance.GraphicsDevice, 5, 5);
         image.Fill(Color.White);
     }
     else
     { image.Texture = Image; }
 }
Exemple #2
0
 public Particle(ParticleEmitter Engine)
     : this(Engine, null, Vector2.Zero, Vector2.Zero, 0)
 {
 }