예제 #1
0
 private void BuildTower(TowerType type)
 {
     level = (GameLevel)Level.Current;
     Hide();
     if (IsSpecialAttackPossible())
     {
         SpecialAttackSelector.SelectAttack(level.GetRealPosition(clickedPosition));
     }
     else
     {
         level.SpawnTower(type, clickedPosition, 180.0f);
     }
 }
예제 #2
0
 private static void AddInputCommands()
 {
     new Command(GameCommands.MouseLeftButtonClick.ToString(), pos =>
     {
         var cinematicMenus = MenuController.Current.GetAllCinematicMenus();
         if (cinematicMenus.Any(cinematic => cinematic.IsShown) || cinematicMenus.Count == 0)
         {
             return;
         }
         if (IsSpecialAttackPossible(pos))
         {
             SpecialAttackSelector.SelectAttack(((GameLevel)Level.Current).GetRealPosition(pos));
         }
         else
         {
             ShowTowerPanel(pos);
         }
     });
 }