void Start() { inventoryUI = InventoryUI.instance; journalUI = JournalUI.instance; idleUI = IdleUI.instance; dialogueManager = DialogueManager.instance; }
void Awake() { if (instance != null) { Debug.LogWarning("Multiple Idle UIs found"); } instance = this; }
public void IdleUISetActive(bool value) { if (idleUI != null) { idleUI.gameObject.SetActive(value); } else { idleUI = IdleUI.instance; idleUI.gameObject.SetActive(value); } }
void Update() { if (journal == null || idleUI == null || dManager == null) { journal = JournalUI.instance; idleUI = IdleUI.instance; dManager = DialogueManager.instance; } if (Input.GetButtonDown("Journal") && !isOpen && !dManager.dialogueOpen) { journal.gameObject.SetActive(true); idleUI.gameObject.SetActive(false); journal.ToggleUI(); isOpen = true; } else if (Input.GetButtonDown("Journal") && isOpen) { journal.gameObject.SetActive(false); idleUI.gameObject.SetActive(true); journal.CloseUI(); isOpen = false; } }
void Start() { journal = JournalUI.instance; idleUI = IdleUI.instance; dManager = DialogueManager.instance; }