コード例 #1
0
 public void SellTower()
 {
     _currentNodeSelected.SellTower(); //Sell the tower
     _currentNodeSelected = null;      //Loose the reference
     nodeUIPanel.SetActive(false);     //Close the UI Panel after we sell the tower
     RallyPointButton.SetActive(false);
 }
コード例 #2
0
 private void NodeSelected(scrTowerNode nodeSelected) //gets the reference
 {
     _currentNodeSelected = nodeSelected;             //If the node is empty, show the tower shop UI
     if (_currentNodeSelected.NodeIsEmpty())
     {
         towerShopPanel.SetActive(true);
     }
     else
     {
         ShouWUpgradePanel(); //If there is a tower on the node, show the NodeUIpanel
         //print("Hi, i run every time you click on a new tower. I am the function you are looking for!"); //YES
         OnTowerSelected?.Invoke(_currentNodeSelected.Tower);
     }
 }
コード例 #3
0
 private void TowerSold()
 {
     _currentNodeSelected = null;
 }
コード例 #4
0
 private void NodeSelected(scrTowerNode nodeSelected)
 {
     _currentNodeSelected = nodeSelected;
 }
コード例 #5
0
 private void NodeSelected(scrTowerNode nodeSelected) //gets the reference
 {
     _currentNodeSelected = nodeSelected;
     //get reference to a tower rallypoint button
 }