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(); }
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); } }
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); }