Exemplo n.º 1
0
 public void BuyTower(TowerItem towerItem)
 {
     if (GameManager.Instance.Buy(towerItem.price))
     {
         tower.SetTower(towerItem);
         tower.gameObject.SetActive(true);
     }
 }
Exemplo n.º 2
0
 public void SetTower(TowerItem item)
 {
     GetComponent <SpriteRenderer>().sprite   = item.sprite;
     GetComponent <CircleCollider2D>().radius = item.range;
     shootInterval = item.shootInterval;
     damage        = item.damage;
     Price         = item.price;
 }
 public void BuildTower(TowerItem towerItem)
 {
     currentTowerBase.BuyTower(towerItem);
     gameObject.SetActive(false);
 }