public void buy(int id) { TowerSoCollection.TowerCollectionClass tower = GetTowerCollection(id); if (tower.price <= gs.MapMoney) { cursor.Hold(towerCollection.Towers[id - 101].DummyTower.gameObject, towerCollection.Towers[id - 101].RealTower.gameObject); } else { print("Not enough money"); print("Money: " + gs.MapMoney); print("price: " + tower.price); notenoughmoney.playAnimation(); } }
public void SetText(int id) { currentCollection = GetTowerCollection(id); currentTower = currentCollection._Tower; SetTowerAttributes(); SetProjectileAttributes(); SetDescription(); SetImages(); if (fromTower) { button.SetActive(true); fromTower = false; } else { button.SetActive(false); } Slide("in"); }