Beispiel #1
0
 Sprite InstanceToSprite(ParticleInstance inst)
 {
     return new Sprite(sheet, sheet.Dimension, sheet.Origin);
 }
Beispiel #2
0
 public void Draw(SpriteBatch sb, ParticleInstance inst)
 {
     Color dispColor = Color.White * (inst.Age > inst.Source.FadeAge ? (float)(inst.Source.MaxLife - inst.Age) / (inst.Source.MaxLife - inst.Source.FadeAge) : 1.0f);
     InstanceToSprite(inst).Draw(sb, inst.Position, MathHelper.PiOver2 - inst.Angle, Vector2.One, dispColor);
 }