public void OnGUI() { if (!_playerInTrigger || _doorIsPaused) { return; } GUI.skin = Skin; if (TransitOnTriggerEntry) { if (DebugMode) { Debug.Log("Due to Transit on Trigger Entry flag, transiting from door " + gameObject.name); } StartCoroutine(BeginTransition()); return; } if (EnterButton.IsClicked() || Input.GetButtonUp("Interact")) { if (DebugMode) { Debug.Log("Enter button was clicked for Door: " + gameObject.name); } StartCoroutine(BeginTransition()); } }
public void OnGUI() { if (!_showButton) { return; } GUI.skin = Skin; if (TalkButton.IsClicked() || Input.GetButtonUp("Interact")) { if (DebugMode) { Debug.Log("Entity flagged as being able to talk..."); } _showButton = false; CanTalk = true; } }
public void OnGUI() { if (!_showGUI || _teleporterIsPaused) { return; } GUI.skin = Skin; if (EnterButton.IsClicked() || Input.GetButtonUp("Interact")) { if (DebugMode) { Debug.Log("Enter button was clicked for Teleporter: " + gameObject.name); } CheckIfTransitionOccurred(); } }
public void OnGUI() { switch (_Phase) { case SpeechPhase.CanTalk: GUI.skin = MapSkin; if (SpeechNotice.IsClicked()) { _Maestro.PlaySoundEffect(ButtonSound); _Phase = SpeechPhase.Conversation; _DialogueIndex = _DialogueStartIndex; TransitionTextbox(); } break; case SpeechPhase.Conversation: GUI.skin = DialogueSkin; TextBackground.DrawMe(); Speaker.DrawMe(); Content.DrawMe(); for (int i = 0; i < DialogueLines[_DialogueIndex].Buttons.Count; i++) { DialogueButton button = DialogueLines[_DialogueIndex].Buttons[i]; if (button.Button.IsClicked()) { _Maestro.PlaySoundEffect(ButtonSound); _DialogueIndex = button.DialogueIndex; _DialogueStartIndex = button.NewDialogueStartIndex; TransitionTextbox(); } } break; default: break; } }