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); }
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); } }
private void TowerSold() { _currentNodeSelected = null; }
private void NodeSelected(scrTowerNode nodeSelected) { _currentNodeSelected = nodeSelected; }
private void NodeSelected(scrTowerNode nodeSelected) //gets the reference { _currentNodeSelected = nodeSelected; //get reference to a tower rallypoint button }