Esempio n. 1
0
        public static void DialogueSystemFinished(this BehaviorManager behaviorManager, Transform actor, TaskStatus status, string lastLine)
        {
            if (behaviorManager == null)
            {
                return;
            }
            var task = behaviorManager.TaskForObject(actor);

            if (task is StartConversation)
            {
                var startConversationTask = task as StartConversation;
                startConversationTask.ConversationComplete(status, lastLine);
            }
            else if (task is StartSequence)
            {
                var startSequenceTask = task as StartSequence;
                startSequenceTask.SequenceComplete(status);
            }
        }
Esempio n. 2
0
        public static void ICodeFinished(this BehaviorManager behaviorManager, ICodeBehaviour iCodeBehavior, TaskStatus status)
        {
            if (behaviorManager == null)
            {
                return;
            }

            var task = behaviorManager.TaskForObject(iCodeBehavior);

            if (task is Tasks.ICode.StartStateMachine)
            {
                var iCodeTask = task as Tasks.ICode.StartStateMachine;
                iCodeTask.ICodeFinished(status);
            }
            else if (task is RunConditionalStateMachine)
            {
                var iCodeTask = task as RunConditionalStateMachine;
                iCodeTask.ICodeFinished(status);
            }
        }