shop progress

This commit is contained in:
BOT Alex 2024-04-21 00:02:41 +02:00
parent 0b0d2594cd
commit b13cdcd02d
2 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,9 @@ public class GameManager : MonoBehaviour
public bool IsBuildMode = false; public bool IsBuildMode = false;
private Tower selectedTower; private Tower selectedTower;
public TowerInfo ShopSelectedTower;
public Tower SelectedTower { get { return selectedTower; } set { public Tower SelectedTower { get { return selectedTower; } set {
if (selectedTower != null) if (selectedTower != null)
selectedTower.TowerSelected(false); selectedTower.TowerSelected(false);

View File

@ -35,6 +35,7 @@ public class MoneyManager : MonoBehaviour
{ {
Assert.AreNotEqual(index, -1, "Shop button not init-ed with index"); Assert.AreNotEqual(index, -1, "Shop button not init-ed with index");
GameManager.Instance.ShopSelectedTower = towerCollection.Towers[index];
GameManager.Instance.IsBuildMode = true;
} }
} }