Esempio n. 1
0
        public void Die(object sender, CancellableEventArgs e)
        {
            // Make a random bonus

            Random r = new Random();

            if (r.Next() % 6 == 0)
            {
                int nbTypeBonus;
                int i = 0;
                while (i < ProgressManager.ArmesDebloque.Length && ProgressManager.ArmesDebloque[i])
                {
                    i++;
                }
                if (i == ProgressManager.ArmesDebloque.Length)
                {
                    nbTypeBonus = 3;
                }
                else
                {
                    nbTypeBonus = 4;
                }

                Bonus b = new Bonus(this.X, this.Y, this.Map, (BonusType)r.Next(nbTypeBonus));
            }

            //Make a sound
            SoundManager.ImpactRobot.Play();
        }
Esempio n. 2
0
 private void Joueur_Moved(object sender, CancellableEventArgs e)
 {
     for (int i = 0; i < 2; i++)
     {
         Lights[i].Position = new Vector2(X * Map.TileWidth / Map.EntityPixelPerCase + Size / 2,
                                          Y * Map.TileWidth / Map.EntityPixelPerCase + Size / 2);
     }
 }
Esempio n. 3
0
 public void Die(object sender, CancellableEventArgs e)
 {
     IsDead = true;
     Game1.Penumbra.Lights.Remove(Lights[0]);
     Game1.Penumbra.Lights.Remove(Lights[1]);
     ProgressManager.Argent += ProgressManager.ArgentDernierePartie;
     Game1.SetPartieDeJeu((int)TypesDePartieDeJeu.Perdu);
 }
 public void FireMoved(object sender, CancellableEventArgs e)
 {
     Moved?.Invoke(sender, e);
 }