private void Dialog_OnClosed(string branch) { dialogInstance.OnClosed -= Dialog_OnClosed; inputManager.Flush(); Destroy(dialogInstance.gameObject); dialogInstance = null; }
public override void Interact() { dialogInstance = dialogPrefab.Instantiate().GetComponent<Dialog>(); dialogInstance.StartConversation(ConversationManager.Instance.GetConversation(conversationName)); dialogInstance.OnClosed += Dialog_OnClosed; if (patroller != null) patroller.disableCharacterMotor = true; }
private void Dialog_OnClosed(string branch) { dialogInstance.OnClosed -= Dialog_OnClosed; InputManager.Instance.Flush(); Destroy(dialogInstance.gameObject); dialogInstance = null; //FindObjectOfType<InputManager>().DisableCharacterMotor = false; }
public override void Trigger(string progression) { if (hero) hero.enabled = false; this.progression = progression; dialogInstance = dialogPrefab.Instantiate().GetComponent<Dialog>(); dialogInstance.StartConversation(ConversationManager.Instance.GetConversation(conversationName)); dialogInstance.OnClosed += Dialog_OnClosed; }
private void Dialog_OnClosed(string branch) { dialogInstance.OnClosed -= Dialog_OnClosed; inputManager.Flush(); Destroy(dialogInstance.gameObject); dialogInstance = null; if (patroller != null) patroller.disableCharacterMotor = false; //FindObjectOfType<InputManager>().DisableCharacterMotor = false; PostDialog(); }
private void Dialog_OnClosed(string branch) { dialogInstance.OnClosed -= Dialog_OnClosed; InputManager.Instance.Flush(); Destroy(dialogInstance.gameObject); dialogInstance = null; if (hero) hero.enabled = true; if (!string.IsNullOrEmpty(progression)) GameStateManager.Instance.GameData.StoryProgressions.Add(progression); OnPostDialog(); }
public override void Interact() { GameStateManager.Instance.GameData.Collectibles.Add(chestKey); opened = true; UpdateRendererComponent(); dialogInstance = dialogPrefab.Instantiate().GetComponent<Dialog>(); var convo = string.Empty; if (gold > 0) { convo = string.Format("You found {0} gold!", gold); GameStateManager.Instance.GameData.Gold += gold; } else { convo = string.Format("You found a {0}!", "item"); } dialogInstance.StartConversation(convo); dialogInstance.OnClosed += Dialog_OnClosed; }
public override void Interact() { dialogInstance = dialogPrefab.Instantiate().GetComponent<Dialog>(); dialogInstance.StartConversation(CreateConversation()); dialogInstance.OnClosed += Dialog_OnClosed; }