From b13cdcd02d1271c0f7a6b24bc00a5b10ef413f4a Mon Sep 17 00:00:00 2001 From: BOT Alex <44818698+MagicBOTAlex@users.noreply.github.com> Date: Sun, 21 Apr 2024 00:02:41 +0200 Subject: [PATCH] shop progress --- Assets/Scripts/Manager/GameManager.cs | 3 +++ Assets/Scripts/Manager/MoneyManager.cs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) 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; } }