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; }
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; }
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; }