diff --git a/Assets/Script/InventoryManager.cs b/Assets/Script/InventoryManager.cs index 1a9f6bd..82bffb5 100644 --- a/Assets/Script/InventoryManager.cs +++ b/Assets/Script/InventoryManager.cs @@ -13,7 +13,9 @@ public class InventoryManager : MonoBehaviour public Tilemap selectorMap; public TileBase[] selector; public TextMeshProUGUI turnCount; + public GameObject StartUI; public AudioSource music; + private bool started = false; [Space] public GameObject[] slots; @@ -64,6 +66,12 @@ public class InventoryManager : MonoBehaviour } draggedPosition = -1; } + if(!started && Input.anyKeyDown) + { + started = true; + StartUI.SetActive(false); + GetComponent().Initiate(); + } if (Input.GetKeyDown(KeyCode.R)) { ClearBoard(); diff --git a/Assets/Script/Mission.cs b/Assets/Script/Mission.cs index 90cd8ce..6f5a473 100644 --- a/Assets/Script/Mission.cs +++ b/Assets/Script/Mission.cs @@ -20,7 +20,8 @@ public class Mission : MonoBehaviour { TreeItem[] items; public GameObject WinUI; public GameObject LooseUI; - private void Start() + + public void Initiate() { items = GetComponent().items; if(items == null)