Exemple #1
0
        public void LevelUp(int oldRound, int lives)
        {
            //moves to the next level when the procedure is called
            switch (oldRound)
            {
            case -1:
                Components.Clear();
                blnGameOver = true;
                break;

            case 0:
                levelRocks = new LevelRocks(this, lives);
                Components.Add(levelRocks);
                Components.Remove(baseLevel);
                baseLevel = null;
                break;

            case 1:
                levelShooter = new LevelShooter(this, lives);
                Components.Add(levelShooter);
                Components.Remove(levelRocks);
                levelRocks = null;
                break;
            }
        }
Exemple #2
0
 public void LevelUp(int oldRound, int lives)
 {
     //moves to the next level when the procedure is called
     switch (oldRound)
     {
         case -1:
             Components.Clear();
             blnGameOver = true;
             break;
         case 0:
             levelRocks = new LevelRocks(this, lives);
             Components.Add(levelRocks);
             Components.Remove(baseLevel);
             baseLevel = null;
             break;
         case 1:
             levelShooter = new LevelShooter(this, lives);
             Components.Add(levelShooter);
             Components.Remove(levelRocks);
             levelRocks = null;
             break;
     }
 }