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

        tower = _tower;
        Debug.Log("Tower build!");
        towerCount++;
    }
Пример #3
0
    public void SelectNode(Node node)
    {
        if (selectedNode == node)
        {
            DeselectNode();
            return;
        }

        selectedNode = node;
        towerToBuild = null;

        nodeUI.SetTarget(node);
    }
Пример #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!");
    }
Пример #5
0
 public void SelectTowerToBuild(TowerBluePrint tower)
 {
     towerToBuild = tower;
 }
Пример #6
0
 public void SelectTowerToBuild(TowerBluePrint tower)
 {
     //tower.prefab.GetComponent<Tower>().
     towerToBuild = tower;
 }
Пример #7
0
 public void SelectTowerToBuild(TowerBluePrint tower)
 {
     towerToBuild = tower;
     DeselectNode();
 }