Esempio n. 1
0
 void Start()
 {
     buildmanager  = BuildManager.GetInstance;
     nodeUI        = buildmanager.nodeUISetter;
     standartTower = TowersShop.GetTower("Standart");
     missleTower   = TowersShop.GetTower("Missle");
     fireTower     = TowersShop.GetTower("Fire");
 }
Esempio n. 2
0
    //
    // Setting text
    //
    private void SetSellText()
    {
        NodeController node = bm.GetSelectedNode;
        TowerBlueprint tb   = TowersShop.GetTower(node.GetTowerTitle);

        if (tb != null)
        {
            sellText.text = "Sell\n$" + tb.sellCost;
        }
    }
Esempio n. 3
0
    private void SetShopText()
    {
        TowerBlueprint tbGun    = TowersShop.GetTower("Standart");
        TowerBlueprint tbMissle = TowersShop.GetTower("Missle");

        if (tbGun != null && tbMissle != null)
        {
            gunTowerText.text    = "Gun tower\n$" + tbGun.cost;
            MissleTowerText.text = "Missle tower\n$" + tbMissle.cost;
        }
    }
Esempio n. 4
0
 public void SellTower()
 {
     if (selectedNode != null)
     {
         TowerBlueprint towerBlueprint = TowersShop.GetTower(selectedNode.GetTowerTitle);
         if (towerBlueprint != null)
         {
             Destroy(selectedNode.tower);
             selectedNode.tower = null;
             PlayerStats.ChangeCurrency(towerBlueprint.sellCost);
         }
     }
 }
Esempio n. 5
0
 public void UpgradeTower()
 {
     if (selectedNode != null)
     {
         TowerBlueprint towerBlueprint = TowersShop.GetTower("Upgraded " + selectedNode.GetTowerTitle);
         if (towerBlueprint != null)
         {
             if (towerBlueprint != null && selectedNode != null && PlayerStats.ChangeCurrency(-towerBlueprint.cost))
             {
                 Destroy(selectedNode.tower);
                 SetTower(towerBlueprint);
             }
         }
     }
 }
Esempio n. 6
0
    private void SetUpgradeText()
    {
        NodeController node = bm.GetSelectedNode;
        TowerBlueprint tb   = TowersShop.GetTower(node.GetTowerTitle);

        if (tb != null)
        {
            if (tb.upgradeCost == 0)
            {
                upgradeText.text = "Can't\nupgrade";
            }
            else
            {
                upgradeText.text = "Upgrade\n$" + tb.upgradeCost;
            }
        }
    }