예제 #1
0
        private void Dialog_OnClosed(string branch)
        {
            dialogInstance.OnClosed -= Dialog_OnClosed;

            inputManager.Flush();

            Destroy(dialogInstance.gameObject);
            dialogInstance = null;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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;
        }
예제 #5
0
        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();
        }
예제 #7
0
        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;
        }
예제 #8
0
 public override void Interact()
 {
     dialogInstance = dialogPrefab.Instantiate().GetComponent<Dialog>();
     dialogInstance.StartConversation(CreateConversation());
     dialogInstance.OnClosed += Dialog_OnClosed;
 }