public void RepairButtonSelected()
 {
     if (!_enoughGold)
     {
         _notificationPanel.SetNotificationType("NotEnoughMoney");
         _notificationPanel.Appear();
         _buildCheckPanel.DisAppear();
         return;
     }
     if (_fullHp)
     {
         _notificationPanel.SetNotificationType("RepairWithFullHp");
         _notificationPanel.Appear();
         _buildCheckPanel.DisAppear();
         _towerInfoPanel.SetOriginalowerInfo();
         _towerInfoPanel.ResetTextColor();
         return;
     }
     _tileEventHandler.SetOperation(7);
     _buildCheckPanel.Appear();
     _towerInfoPanel.RepairCase();
     _towerInfoPanel.ResetTextColor();
     _towerInfoPanel.SetOriginalowerInfo();
     _towerInfoPanel.Appear();
     _notificationPanel.SetNotificationType("Repair");
     _notificationPanel.Appear();
 }
 public void UpgradeButtonSelected()
 {
     if (!_enoughGold)
     {
         _notificationPanel.SetNotificationType("NotEnoughMoney");
         _notificationPanel.Appear();
         _buildCheckPanel.DisAppear();
         _towerInfoPanel.ResetTextColor();
         return;
     }
     if (_destroy)
     {
         _notificationPanel.SetNotificationType("UpgradeWhenDestroied");
         _notificationPanel.Appear();
         _buildCheckPanel.DisAppear();
         _towerInfoPanel.ResetTextColor();
         return;
     }
     _tileEventHandler.SetOperation(6);
     _bcpYes.SetUpgradeCase();
     _buildCheckPanel.Appear();
     _towerInfoPanel.SetUpgradingColor();
     _towerInfoPanel.DisplayUpgradedInfo();
     _towerInfoPanel.Appear();
     _notificationPanel.SetNotificationType("Upgrade");
     _notificationPanel.Appear();
 }
예제 #3
0
 public void SellButtonSelected()
 {
     //Debug.Log("SB: Sell button clicked");
     _tileEventHandler.SetOperation(8);
     _buildCheckPanel.Appear();
     _towerInfoPanel.ResetTextColor();
     _towerInfoPanel.ResetRepairCase();
     _towerInfoPanel.SetOriginalowerInfo();
     _towerInfoPanel.Appear();
     _notificationPanel.SetNotificationType("Sell");
     _notificationPanel.Appear();
 }
    public void TankTowerSelected()
    {
        _gameBoard.ClearHighlightTiles();
        _tileEventHandler.SelectTowerType(0);
        _tileEventHandler.SetOperation(1);
        int[] towerInfo = new int[11];
        int   range     = _towerController.CheckTowerInfo(0, towerInfo);

        //Debug.Log("Range is " + range + " " + _tileEventHandler.GridX + " " + _tileEventHandler.GridY);
        _tileEventHandler.DisplayAttackRange(range);
        _buildCheckPanel.Appear();
        _towerInfoPanel.SetTowerInfo(towerInfo);
        _towerInfoPanel.Appear();
        _notificationPanel.SetNotificationType("Tank");
        _notificationPanel.Appear();
    }