Esempio n. 1
12
 protected override void upgrade(Player player)
 {
     Bomb b = new Bomb(map, player, "Images/bomb1");
     b.Initialize();
     b.LoadContent();
     player.AddBomb(b);
 }
Esempio n. 2
0
        //protected LinkedList<Bomb> bombCollection = new LinkedList<Bomb>();

        /// <summary>
        /// Creates and loads initial count of bombs to player's bomb collection.
        /// When planting a bomb, one of this will be used. When bomb exploades, it is returned to the
        /// player and reused. If bomb collection is empty, player shall not plant a bomb.
        /// </summary>
        protected void loadBombs()
        {
            Bomb b;
            for (int i = 0; i < bombsCount; i++)
            {
                b = new Bomb(map, this, "Images/bomb1");
                b.LoadContent();
                bombCollection.Enqueue(b);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// This method is called by a bomb when it has exploaded. It is returned to the player and reused.
 /// Could be called by bonus to add to player a new bomb
 /// </summary>
 public void AddBomb(Bomb bomb)
 {
     bombCollection.Enqueue(bomb);
 }
Esempio n. 4
0
 /// <summary>
 /// This method is called by a bomb when it has exploaded. It is returned to the player and reused.
 /// Could be called by bonus to add to player a new bomb
 /// </summary>
 public void AddBomb(Bomb bomb)
 {
     bombCollection.Enqueue(bomb);
 }