mirror of
https://github.com/zoriya/Magical-Garden.git
synced 2025-12-06 07:16:15 +00:00
Adding a start menu UI code.
This commit is contained in:
@@ -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<Mission>().Initiate();
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.R))
|
||||
{
|
||||
ClearBoard();
|
||||
|
||||
@@ -20,7 +20,8 @@ public class Mission : MonoBehaviour {
|
||||
TreeItem[] items;
|
||||
public GameObject WinUI;
|
||||
public GameObject LooseUI;
|
||||
private void Start()
|
||||
|
||||
public void Initiate()
|
||||
{
|
||||
items = GetComponent<InventoryManager>().items;
|
||||
if(items == null)
|
||||
|
||||
Reference in New Issue
Block a user