Пример #1
0
 public void Smoke()
 {
     if (SmokePos1 != Vector3.Zero)
     {
         /*Step 4*/
         LightSystem.AddParticle(Position + Vector3.Transform(SmokePos1, Matrix.CreateFromQuaternion(Orientation)), Vector3.Zero);
     }
     if (SmokePos2 != Vector3.Zero)
     {
         LightSystem.AddParticle(Position + Vector3.Transform(SmokePos2, Matrix.CreateFromQuaternion(Orientation)), CurrentVelocity);
     }
 }
Пример #2
0
 public void ExpodeAnimation(Vector3 pos, Vector3 vel)
 {
     game.soundBank.PlayCue("ExplosionSound1");
     for (int i = 0; i < 15; i++)
     {
         explosionParticleSystem.AddParticle(pos + new Vector3(0, 0, -10),
                                             new Vector3(RandomNumber(-5, 5), RandomNumber(-5, 5), 0));
         for (int j = 0; j < 3; j++)
         {
             explosionSmokeParticleSystem.AddParticle(pos + new Vector3(0, 0, -5),
                                                      new Vector3(RandomNumber(-30, 30), RandomNumber(-30, 30), 0) + vel);
         }
     }
 }
Пример #3
0
 public void DamageAnimation(Vector3 pos, Vector3 vel)
 {
     game.soundBank.PlayCue("DamageSound1");
     for (int i = 0; i < 15; i++)
     {
         damageParticleSystem.AddParticle(pos + new Vector3(0, 0, -10),
                                          new Vector3(0, 0, 0) + vel / 50);
         if (i > 12)
         {
             damageSmokeParticleSystem.AddParticle(pos + new Vector3(0, 0, 0),
                                                   new Vector3(0, 0, 0) + vel / 50);
         }
     }
 }