Exemplo n.º 1
0
 void Start()
 {
     inventoryUI     = InventoryUI.instance;
     journalUI       = JournalUI.instance;
     idleUI          = IdleUI.instance;
     dialogueManager = DialogueManager.instance;
 }
Exemplo n.º 2
0
 void Awake()
 {
     if (instance != null)
     {
         Debug.LogWarning("Multiple Idle UIs found");
     }
     instance = this;
 }
Exemplo n.º 3
0
 public void IdleUISetActive(bool value)
 {
     if (idleUI != null)
     {
         idleUI.gameObject.SetActive(value);
     }
     else
     {
         idleUI = IdleUI.instance;
         idleUI.gameObject.SetActive(value);
     }
 }
Exemplo n.º 4
0
 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;
     }
 }
Exemplo n.º 5
0
 void Start()
 {
     journal  = JournalUI.instance;
     idleUI   = IdleUI.instance;
     dManager = DialogueManager.instance;
 }