void Awake() { DialogueManagerProxy.Open(this); m_Sentences = new Queue <Dialogue.ITextInterface> (); this.RegisterAsListener("Player", typeof(PlayerInputGameEvent)); this.RegisterAsListener("Dialogue", typeof(DialogueEvent)); }
private void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player" && !m_DoneOnce) { m_DoneOnce = true; m_Demon.SetActive(true); DialogueManagerProxy.Get().TriggerDialogue(m_DialogueTag); } }
void Awake() { DialogueManagerProxy.Open(this); this.RegisterAsListener("Player", typeof(PlayerInputGameEvent)); foreach (DialogueOptionButton optionButton in m_OptionButtons) { optionButton.Reset(); } }
public void RemoveCharacterWithDialogue(string characterId) { if (!characterId.Equals("Prince")) { RemoveCharacter(characterId); if (m_WaitingForDiversion) { new OnCharacterDiversionEvent().Push(); m_WaitingForDiversion = false; } } if (!m_WaitingForDiversion) { DialogueManagerProxy.Get().TriggerDialogue(characterId + " LetGo"); } }
private void OnEnter() { new CameraUnfollowEvent().Push(); if (!m_IsVisited) { string tag = m_Resource.GetDialogueTag(); m_IsVisited = true; switch (m_Resource.GetNodeType()) { case ENodeType.Normal: if (tag != "") { DialogueManagerProxy.Get().TriggerDialogue(tag); } break; case ENodeType.Battle: new OnNodeBattleGameEvent(true, this).Push(); break; case ENodeType.Recruitment: DialogueManagerProxy.Get().TriggerDialogue(tag); break; case ENodeType.Key: DialogueManagerProxy.Get().TriggerDialogue("Key Found"); TeamManagerProxy.Get().GetKey(); break; case ENodeType.End: if (m_Resource.NeedKey()) { if (TeamManagerProxy.Get().HasKey()) { DialogueManagerProxy.Get().TriggerDialogue(tag); new GameFlowEvent(EGameFlowAction.LevelWon).Push(); } else { DialogueManagerProxy.Get().TriggerDialogue("No Key"); m_IsVisited = false; } } else { DialogueManagerProxy.Get().TriggerDialogue(tag); new GameFlowEvent(EGameFlowAction.LevelWon).Push(); } break; default: if (tag != "") { DialogueManagerProxy.Get().TriggerDialogue(tag); } break; } } }