Esempio n. 1
0
 public void SellTower()
 {
     PlayerManager.Crate += towerBluePrint.GetSellAmount();
     Destroy(tower);
     isUpgraded     = false;
     towerBluePrint = null;
 }
Esempio n. 2
0
    void BuildTurret(TowerBluePrint blueprint, Vector3 position)
    {
        GameObject _tower = (GameObject)Instantiate(blueprint.prefab, position, Quaternion.identity);

        tower = _tower;
        Debug.Log("Tower build!");
        towerCount++;
    }
    public void SelectNode(Node node)
    {
        if (selectedNode == node)
        {
            DeselectNode();
            return;
        }

        selectedNode = node;
        towerToBuild = null;

        nodeUI.SetTarget(node);
    }
Esempio n. 4
0
    void BuildTower(TowerBluePrint blueprint)
    {
        if (PlayerManager.Crate < blueprint.crateCost)
        {
            Debug.Log("Not enough money.");
            return;
        }

        PlayerManager.Crate -= blueprint.crateCost;
        SoundManager.PlaySound("upgrade");
        GameObject _tower = (GameObject)Instantiate(blueprint.prefab, GetBuildPosition(), Quaternion.identity);

        tower = _tower;

        towerBluePrint = blueprint;

        Debug.Log("Tower build!");
    }
Esempio n. 5
0
 public void SelectTowerToBuild(TowerBluePrint tower)
 {
     towerToBuild = tower;
 }
Esempio n. 6
0
 public void SelectTowerToBuild(TowerBluePrint tower)
 {
     //tower.prefab.GetComponent<Tower>().
     towerToBuild = tower;
 }
 public void SelectTowerToBuild(TowerBluePrint tower)
 {
     towerToBuild = tower;
     DeselectNode();
 }