diff --git a/Assets/Scripts/Manager/GameManager.cs b/Assets/Scripts/Manager/GameManager.cs index a2a1df7..f14a12b 100644 --- a/Assets/Scripts/Manager/GameManager.cs +++ b/Assets/Scripts/Manager/GameManager.cs @@ -7,6 +7,9 @@ public class GameManager : MonoBehaviour public bool IsBuildMode = false; private Tower selectedTower; + + public TowerInfo ShopSelectedTower; + public Tower SelectedTower { get { return selectedTower; } set { if (selectedTower != null) selectedTower.TowerSelected(false); diff --git a/Assets/Scripts/Manager/MoneyManager.cs b/Assets/Scripts/Manager/MoneyManager.cs index 5c3c099..1cb795a 100644 --- a/Assets/Scripts/Manager/MoneyManager.cs +++ b/Assets/Scripts/Manager/MoneyManager.cs @@ -35,6 +35,7 @@ public class MoneyManager : MonoBehaviour { Assert.AreNotEqual(index, -1, "Shop button not init-ed with index"); - + GameManager.Instance.ShopSelectedTower = towerCollection.Towers[index]; + GameManager.Instance.IsBuildMode = true; } }