Esempio n. 1
0
    public void buildCannonTower()
    {
        if (fm.checkBalanceAgainst(data.CannonTowerPrice[0]))
        {
            fm.useMoney(data.CannonTowerPrice[0]);
            int stubID = gameSceneController.getChosenStubNum();
            Debug.Log("buildCannonTower at " + stubID);
            BuildBtnGroup.SetActive(false);
            Transform tower = stubList[stubID].GetComponent <StubBehavior>().buildCannonTower();
            tower.GetComponent <BaseTowerBehavior>().setStubID(stubID);

            int id = towerList.Count;
            tower.GetComponent <BaseTowerBehavior>().setID(id);
            towerList.Add(tower);
        }
    }