Ejemplo n.º 1
0
 private void Zap()
 {
     if (Data.Player.LaneIndex == LaneIndex && !Data.Player.Jumping && !Data.Player.Bouclier)
     {
         Data.Player.Die();
         ExplosionJoueur2 exp = new ExplosionJoueur2(Game, Data.Player, level_.laneSize);
         Game.Components.Add(exp);
     }
     if (!zapping)
     {
         SonZap.Play();
         zapping = true;
         level_[LaneIndex].Zapped = true;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// When warping
 /// </summary>
 /// <param name="elapse"></param>
 public void MoveDown(float elapse)
 {
     Position -= new Vector3(0f, -2f / 3 * level_.DeltaY * elapse, 10f * elapse) * 0.8f;
     Hauteur += 10f * elapse;
     if (level_.Spikes[LaneIndex] > 0)
     {
         if (Position.Z <= level_.vSpikes[LaneIndex].dest.Z)
         {
             ExplosionJoueur2 exp = new ExplosionJoueur2(Game, this, level_.laneSize);
             exp.OnStop += new VoidEventHandler(Die);
             Game.Components.Add(exp);
         }
     }
     CalculerMonde();
 }