示例#1
0
文件: Game.cs 项目: ITCareer-Lom/code
 public bool NextLevel() // TEST преминаваме на следващо ниво(и връща дали е възможно)
 {
     if (!LastLevel() && CurrentLevel.IsCompleted(MyHero))
     {
         LevelNo++;
         State = GameState.Playing;
     }
     else
     {
         State = GameState.GameCompleted;
     }
     return(!LastLevel());
 }
示例#2
0
文件: Game.cs 项目: ITCareer-Lom/code
 public bool NextMove() /* TEST преминаваме на следващ ход, ако можем
                         * (т.е.ако не сме убити, ако не сме завършили и т.н.), иначе прекъсва цикъла*/
 {
     if (MyHero.Health <= 0)
     {
         State = GameState.GameOver;
     }
     else if (CurrentLevel.IsCompleted(MyHero) && LastLevel())
     {
         State = GameState.GameCompleted;
     }
     else if (CurrentLevel.IsCompleted(MyHero) && !LastLevel())
     {
         State = GameState.LevelCompleted;
     }
     else if (State == GameState.Playing)
     {
         MoveNo++;
         CanSelectMove = !CanSelectMove;
         OpponentSelection();
         return(true);
     }
     return(false);
 }