private void Update() { if (_nodeDictionary[_currNode].GetMainText() != null) { if (_canControlTextDisplay) { if (_displayText.Contains("INSERTOBJECTONE")) { _displayText = _displayText.Replace("INSERTOBJECTONE", UseItemManager.GetItemInUse().name); } ControlOverallTextDisplay(_displayText); } _mainLogText = _displayText; } //print(MyName.GetName()); if (IsShowing()) { if (Input.GetKeyDown(KeyCode.Mouse0)) { if (_clickCounter < 2) { _clickCounter += 1; if (_clickCounter == 1) { if (!SceneManager.GetActiveScene().name.Equals("Prologue")) { string logText = GameObject.Find("LogContent").GetComponent <Text>().text; MainText myCurrNode = _nodeDictionary[_currNode]; logText += "\n" + myCurrNode.GetCurrCharacter() + ":"; logText += "\n" + _mainLogText + "\n"; GameObject.Find("LogContent").GetComponent <Text>().text = logText; } } } if (_clickCounter == 2) { MainText currNode = _nodeDictionary[_currNode]; if (currNode.HasChoice() == false) { currNode.InvokeOnClickedEvent(); if (currNode.goToConsecutiveNodeOnClick) { ChangeNode(int.Parse(currNode.gameObject.transform.GetChild(0).GetComponent <Text>().text) + 1); } } } } } MyButton returnButton = null; if (GameObject.Find("BackArrow") != null) { returnButton = GameObject.Find("BackArrow").GetComponent <MyButton>(); } if (returnButton != null) { if (IsShowing()) { InteractionZone.SetInteractionOn(false); if (returnButton != null) { returnButton.Hide(); } } else { InteractionZone.SetInteractionOn(true); if (returnButton != null && GameObject.Find("Classroom") != null && GameObject.Find("Classroom").GetComponent <SpriteRenderer>().color.a < 1) { returnButton.Show(); } } } if (GameObject.Find("Classroom") != null && GameObject.Find("Classroom").GetComponent <SpriteRenderer>().color.a == 1) { if (returnButton != null) { returnButton.Hide(); } } }