Exemple #1
0
        // privates
        private static void setupPhase(int nextPhaseId)
        {
            if (dialogue == null)
            {
                return;
            }

            AbstractDialoguePhase phase = dialogue.phases[nextPhaseId];

            if (phase is EndPhase)
            {
                endDialogue();
                return;
            }

            if (currentPhase != null)
            {
                currentPhase.resetEvents();
            }
            phase.onPhaseComplete += phaseComplete;

            if (phase is TextPhase || phase is BranchedTextPhase)
            {
                //Debug.Log("Phase is: "+phase.GetType().ToString());

                DialoguerEventManager.dispatchOnTextPhase((phase as TextPhase).data);
            }

            currentPhase = phase;

            phase.Start(dialogue.localVariables);
        }
		// privates
		private static void setupPhase(int nextPhaseId){
			
			if(dialogue == null) return;
			
			AbstractDialoguePhase phase =  dialogue.phases[nextPhaseId];
			
			if(phase is EndPhase){
				endDialogue();
				return;
			}
			
			if(currentPhase != null) currentPhase.resetEvents();
			phase.onPhaseComplete += phaseComplete;
			
			if(phase is TextPhase || phase is BranchedTextPhase){
				//Debug.Log("Phase is: "+phase.GetType().ToString());
				
				DialoguerEventManager.dispatchOnTextPhase((phase as TextPhase).data);
				
			}
			
			currentPhase = phase;
			
			phase.Start(dialogue.localVariables);
		}
		private static bool isWindowed(AbstractDialoguePhase phase){
			if(phase is TextPhase || phase is BranchedTextPhase){
				Debug.Log("Phase is: "+phase.GetType().ToString());
				return true;
			}
			
			return false;
		}
Exemple #4
0
        private static bool isWindowed(AbstractDialoguePhase phase)
        {
            if (phase is TextPhase || phase is BranchedTextPhase)
            {
                Debug.Log("Phase is: " + phase.GetType().ToString());
                return(true);
            }

            return(false);
        }
Exemple #5
0
 private static void reset()
 {
     currentPhase  = null;
     dialogue      = null;
     onEndCallback = null;
 }
		private static void reset(){
			currentPhase = null;
			dialogue = null;
			onEndCallback = null;
		}