コード例 #1
0
		public static void startDialogue(int dialogueId){
			if(dialogue != null){ 
				DialoguerEventManager.dispatchOnSuddenlyEnded();
			}
			
			// Dispatch onStart event
			DialoguerEventManager.dispatchOnStarted();
			
			// Set References
			dialogue = DialoguerDataManager.GetDialogueById(dialogueId);
			dialogue.Reset();
			setupPhase(dialogue.startPhaseId);
		}
コード例 #2
0
        public static void startDialogue(int dialogueId)
        {
            if (dialogue != null)
            {
                DialoguerEventManager.dispatchOnSuddenlyEnded();
            }

            // Dispatch onStart event
            DialoguerEventManager.dispatchOnStarted();

            // Set References
            dialogue = DialoguerDataManager.GetDialogueById(dialogueId);
            dialogue.Reset();
            setupPhase(dialogue.startPhaseId);
        }
コード例 #3
0
        public static void endDialogue()
        {
            if (onEndCallback != null)
            {
                onEndCallback();
            }

            // Dispatch onEnd event
            DialoguerEventManager.dispatchOnWindowClose();

            // Dispatch onEnd event
            DialoguerEventManager.dispatchOnEnded();

            // Reset current dialogue
            dialogue.Reset();

            // Clean up
            reset();
        }
コード例 #4
0
        public static void endDialogue()
        {
            if (onEndCallback != null)
            {
                onEndCallback();
            }

            // Dispatch onEnd event
            DialoguerEventManager.dispatchOnWindowClose();

            // Dispatch onEnd event
            DialoguerEventManager.dispatchOnEnded();

            // Reset current dialogue
            dialogue.Reset();

            // Clean up
            reset();

            //Debug.LogError ("DANGER");
            GameManager.dialogueJustFinished = true;
            if (GameManager.Instance.playerInScene)
            {
                playerScript temp = (playerScript)MonoBehaviour.FindObjectOfType(typeof(playerScript));
                if (temp != null)
                {
                    temp.canWalk  = true;
                    temp.walkWait = 30;
                    temp.talking  = false;
                    if (temp.anim != null)
                    {
                        temp.anim.SetFloat("distance", 0f);
                    }
                    temp.setTarget(new Vector2(temp.transform.position.x, temp.transform.position.y));
                }
            }
        }