示例#1
0
 public override void RemoveActionOutput(LogicFunction logicFunction)
 {
     if (actionOutput == logicFunction)
     {
         actionOutput = null;
     }
 }
 public void SetActionInputLink(LogicFunction input)
 {
     if (!actionInputs.Contains(input))
     {
         actionInputs.Add(input);
     }
 }
示例#3
0
        public void SetOutputLink(LogicFunction output)
        {
            if (output != null)
            {
                output.RemoveActionInput(this);
            }

            actionOutput = output;
        }
        public override void RemoveActionOutput(LogicFunction logicFunction)
        {
            int index = actionOutputs.IndexOf(logicFunction);

            if (index != -1)
            {
                actionOutputs.RemoveAt(index);
                realizeOutputs.RemoveAt(index);
            }
        }
示例#5
0
 public override void RemoveActionInput(LogicFunction logicFunction)
 {
     for (int i = 0; i < actionInputs.Count; i++)
     {
         if (actionInputs[i] == logicFunction)
         {
             actionInputs.RemoveAt(i);
             break;
         }
     }
 }
 public void SetOutputLink(LogicFunction output)
 {
     if (!dialogOutputFlag)
     {
         if (method == 0)
         {
             if (brutalOutput != null)
             {
                 brutalOutput.RemoveActionInput(this);
             }
             brutalOutput = output;
         }
         else if (method == 1)
         {
             if (carefulOutput != null)
             {
                 carefulOutput.RemoveActionInput(this);
             }
             carefulOutput = output;
         }
         else if (method == 2)
         {
             if (diplomatOutput != null)
             {
                 diplomatOutput.RemoveActionInput(this);
             }
             diplomatOutput = output;
         }
         else if (method == 3)
         {
             if (scienceOutput != null)
             {
                 scienceOutput.RemoveActionInput(this);
             }
             scienceOutput = output;
         }
     }
     else
     {
         if (dialogOutputs[dialogOutputNum] != null)
         {
             dialogOutputs[dialogOutputNum].RemoveActionInput(this);
         }
         dialogOutputs[dialogOutputNum] = output;
     }
 }
 public override void RemoveActionOutput(LogicFunction logicFunction)
 {
     if (brutalOutput == logicFunction && carefulOutput != logicFunction && diplomatOutput != logicFunction && scienceOutput != logicFunction)
     {
         brutalOutput = null;
     }
     else if (brutalOutput != logicFunction && carefulOutput == logicFunction && diplomatOutput != logicFunction && scienceOutput != logicFunction)
     {
         carefulOutput = null;
     }
     else if (brutalOutput != logicFunction && carefulOutput != logicFunction && diplomatOutput == logicFunction && scienceOutput != logicFunction)
     {
         diplomatOutput = null;
     }
     else if (brutalOutput != logicFunction && carefulOutput != logicFunction && diplomatOutput != logicFunction && scienceOutput == logicFunction)
     {
         scienceOutput = null;
     }
     else
     {
         if (brutalOutput == logicFunction && method != 0)
         {
             brutalOutput = null;
         }
         if (carefulOutput == logicFunction && method != 1)
         {
             carefulOutput = null;
         }
         if (diplomatOutput == logicFunction && method != 2)
         {
             diplomatOutput = null;
         }
         if (scienceOutput == logicFunction && method != 3)
         {
             scienceOutput = null;
         }
     }
     for (int i = 0; i < dialogOutputs.Count; i++)
     {
         if (dialogOutputs[i] == logicFunction)
         {
             dialogOutputs[i] = null;
         }
     }
 }
示例#8
0
 public void SetOutputLink(LogicFunction output)
 {
     if (trueFlag)
     {
         if (trueOutput != null)
         {
             trueOutput.RemoveActionInput(this);
         }
         trueOutput = output;
     }
     else
     {
         if (falseOutput != null)
         {
             falseOutput.RemoveActionInput(this);
         }
         falseOutput = output;
     }
 }
 public void SetOutputLink(LogicFunction output)
 {
     for (int i = 0; i < actionOutputs.Count; i++)
     {
         if (actionOutputs[i] == null)
         {
             if (output != null)
             {
                 actionOutputs[i] = output;
             }
             else
             {
                 actionOutputs.RemoveAt(i);
                 realizeOutputs.RemoveAt(i);
             }
             break;
         }
     }
 }
        public override void DrawLinks()
        {
            LogicSplitter logicSplitter = logicFunction as LogicSplitter;

            for (int j = 0; j < logicSplitter.actionOutputs.Count; j++)
            {
                LogicFunction output = logicSplitter.actionOutputs[j];
                Vector2       startPos;
                Vector2       endPos;
                Color         activeColor = Color.blue;
                Color         backColor   = Color.black;
                startPos = new Vector2(logicSplitter.windowRect.xMax, logicSplitter.windowRect.y + 10 + (j + 1) * 20);
                if (output != null)
                {
                    BaseLogicNode outputNode = null;
                    foreach (BaseLogicNode node in LogicMapEditor.editor.nodes)
                    {
                        if (node is LogicFunctionNode && ((LogicFunctionNode)node).logicFunction == output)
                        {
                            outputNode = node;
                        }
                    }
                    endPos = new Vector2(((LogicFunctionNode)outputNode).logicFunction.windowRect.xMin, ((LogicFunctionNode)outputNode).logicFunction.windowRect.y + 25);
                    if (logicSplitter.realizeOutputs[j])
                    {
                        activeColor = Color.magenta;
                    }
                }
                else
                {
                    endPos      = LogicMapEditor.editor.mousePos;
                    activeColor = Color.yellow;
                }
                Vector2 startTan = startPos + Vector2.right * 50;
                Vector2 endTan   = endPos + Vector2.left * 50;
                backColor = new Color(backColor.r, backColor.g, backColor.b, 0.1f);
                int width = 2;

                Handles.DrawBezier(startPos, endPos, startTan, endTan, activeColor, null, width);
            }
        }
示例#11
0
 public override void RemoveActionOutput(LogicFunction logicFunction)
 {
     if (trueOutput == logicFunction && falseOutput != logicFunction)
     {
         trueOutput = null;
     }
     else if (falseOutput == logicFunction && trueOutput != logicFunction)
     {
         falseOutput = null;
     }
     else if (trueOutput == logicFunction && falseOutput == logicFunction)
     {
         if (trueFlag)
         {
             falseOutput = null;
         }
         else
         {
             trueOutput = null;
         }
     }
 }
        public override void RemoveActionOutput(LogicFunction logicFunction)
        {
            if (rudeOutput == logicFunction && prudentOutput != logicFunction && mercifulOutput != logicFunction && cruelOutput != logicFunction && mercantileOutput != logicFunction && principledOutput != logicFunction)
            {
                rudeOutput = null;
            }
            else if (rudeOutput != logicFunction && prudentOutput == logicFunction && mercifulOutput != logicFunction && cruelOutput != logicFunction && mercantileOutput != logicFunction && principledOutput != logicFunction)
            {
                prudentOutput = null;
            }
            else if (rudeOutput != logicFunction && prudentOutput != logicFunction && mercifulOutput == logicFunction && cruelOutput != logicFunction && mercantileOutput != logicFunction && principledOutput != logicFunction)
            {
                mercifulOutput = null;
            }
            else if (rudeOutput != logicFunction && prudentOutput != logicFunction && mercifulOutput != logicFunction && cruelOutput == logicFunction && mercantileOutput != logicFunction && principledOutput != logicFunction)
            {
                cruelOutput = null;
            }
            else if (rudeOutput != logicFunction && prudentOutput != logicFunction && mercifulOutput != logicFunction && cruelOutput != logicFunction && mercantileOutput == logicFunction && principledOutput != logicFunction)
            {
                mercantileOutput = null;
            }
            else if (rudeOutput != logicFunction && prudentOutput != logicFunction && mercifulOutput != logicFunction && cruelOutput != logicFunction && mercantileOutput != logicFunction && principledOutput == logicFunction)
            {
                principledOutput = null;
            }

            else
            {
                if (rudeOutput == logicFunction && temper != 0)
                {
                    rudeOutput = null;
                }
                if (prudentOutput == logicFunction && temper != 1)
                {
                    prudentOutput = null;
                }
                if (mercifulOutput == logicFunction && temper != 2)
                {
                    mercifulOutput = null;
                }
                if (cruelOutput == logicFunction && temper != 3)
                {
                    cruelOutput = null;
                }
                if (mercantileOutput == logicFunction && temper != 4)
                {
                    cruelOutput = null;
                }
                if (principledOutput == logicFunction && temper != 5)
                {
                    cruelOutput = null;
                }
            }
            for (int i = 0; i < dialogOutputs.Count; i++)
            {
                if (dialogOutputs[i] == logicFunction)
                {
                    dialogOutputs[i] = null;
                }
            }
        }
 public void SetOutputLink(LogicFunction output)
 {
     if (!dialogOutputFlag)
     {
         if (temper == 0)
         {
             if (rudeOutput != null)
             {
                 rudeOutput.RemoveActionInput(this);
             }
             rudeOutput = output;
         }
         else if (temper == 1)
         {
             if (prudentOutput != null)
             {
                 prudentOutput.RemoveActionInput(this);
             }
             prudentOutput = output;
         }
         else if (temper == 2)
         {
             if (mercifulOutput != null)
             {
                 mercifulOutput.RemoveActionInput(this);
             }
             mercifulOutput = output;
         }
         else if (temper == 3)
         {
             if (cruelOutput != null)
             {
                 cruelOutput.RemoveActionInput(this);
             }
             cruelOutput = output;
         }
         else if (temper == 4)
         {
             if (mercantileOutput != null)
             {
                 mercantileOutput.RemoveActionInput(this);
             }
             mercantileOutput = output;
         }
         else if (temper == 5)
         {
             if (principledOutput != null)
             {
                 principledOutput.RemoveActionInput(this);
             }
             principledOutput = output;
         }
     }
     else
     {
         if (dialogOutputs[dialogOutputNum] != null)
         {
             dialogOutputs[dialogOutputNum].RemoveActionInput(this);
         }
         dialogOutputs[dialogOutputNum] = output;
     }
 }
示例#14
0
 public abstract void RemoveActionOutput(LogicFunction logicFunction);
示例#15
0
 public override void RemoveActionOutput(LogicFunction logicFunction)
 {
 }
示例#16
0
        public override void DrawWindow()
        {
            ChooseTemperFunction function   = logicFunction as ChooseTemperFunction;
            SerializedObject     soFunction = new SerializedObject(function);

            EditorGUILayout.BeginHorizontal();
            GUIStyle noneActionStyle = new GUIStyle();

            noneActionStyle.normal.background = eUtils.MakeTex(10, 10, Color.gray);
            GUIStyle actionStyle = new GUIStyle();

            actionStyle.normal.background = eUtils.MakeTex(10, 10, Color.blue);
            GUIStyle realizeActionStyle = new GUIStyle();

            realizeActionStyle.normal.background = eUtils.MakeTex(10, 10, Color.magenta);
            if (function.actionInputs.Count == 0)
            {
                if (!function.startFunction)
                {
                    GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    if (!LogicMapEditor.logicMap.startRealize)
                    {
                        GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                    }
                    else
                    {
                        GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                    }
                }
            }
            else
            {
                bool realizeFlag = false;
                foreach (LogicFunction actionInput in function.actionInputs)
                {
                    if (actionInput is DataSplitter)
                    {
                        DataSplitter input = (DataSplitter)actionInput;
                        if (input.trueOutput == function && input.realizeTrue)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.falseOutput == function && input.realizeFalse)
                        {
                            realizeFlag = true;
                            break;
                        }
                    }
                    else if (actionInput is LogicSplitter)
                    {
                        LogicSplitter input = (LogicSplitter)actionInput;
                        int           index = input.actionOutputs.IndexOf(function);
                        if (input.realizeOutputs[index])
                        {
                            realizeFlag = true;
                            break;
                        }
                    }
                    else if (actionInput is WaitFunction)
                    {
                        WaitFunction input = (WaitFunction)actionInput;
                        if (input.actionOutput == function && input.realize)
                        {
                            realizeFlag = true;
                            break;
                        }
                    }
                    else if (actionInput is ChallengeFunction)
                    {
                        ChallengeFunction input = (ChallengeFunction)actionInput;
                        if (input.trueOutput == function && input.realizeTrue)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.falseOutput == function && input.realizeFalse)
                        {
                            realizeFlag = true;
                            break;
                        }
                    }
                    else if (actionInput is ChooseMethodFunction)
                    {
                        ChooseMethodFunction input = (ChooseMethodFunction)actionInput;
                        if (input.brutalOutput == function && input.realizeBrutal)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.carefulOutput == function && input.realizeCareful)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.diplomatOutput == function && input.realizeDiplomat)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.scienceOutput == function && input.realizeScience)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else
                        {
                            for (int i = 0; i < input.dialogOutputs.Count; i++)
                            {
                                if (input.dialogOutputs[i] == logicFunction && input.realizeDialogOutput[i])
                                {
                                    realizeFlag = true;
                                    break;
                                }
                            }
                        }
                    }
                    else if (actionInput is ChooseTemperFunction)
                    {
                        ChooseTemperFunction input = (ChooseTemperFunction)actionInput;
                        if (input.rudeOutput == logicFunction && input.realizeRude)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.prudentOutput == logicFunction && input.realizePrudent)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.cruelOutput == logicFunction && input.realizeCruel)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else if (input.principledOutput == logicFunction && input.realizePrincipled)
                        {
                            realizeFlag = true;
                            break;
                        }
                        else
                        {
                            for (int i = 0; i < input.dialogOutputs.Count; i++)
                            {
                                if (input.dialogOutputs[i] == logicFunction && input.realizeDialogOutput[i])
                                {
                                    realizeFlag = true;
                                    break;
                                }
                            }
                        }
                    }
                }
                if (realizeFlag)
                {
                    GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
            }
            GUILayout.FlexibleSpace();
            DrawTemperSelector();
            GUILayout.FlexibleSpace();
            EditorGUILayout.BeginVertical();
            if (function.rudeOutput == null)
            {
                GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
            }
            else
            {
                if (function.realizeRude)
                {
                    GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
            }
            GUILayout.Space(15);
            if (function.prudentOutput == null)
            {
                GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
            }
            else
            {
                if (function.realizePrudent)
                {
                    GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
            }
            GUILayout.Space(15);
            if (function.mercifulOutput == null)
            {
                GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
            }
            else
            {
                if (function.realizeMerciful)
                {
                    GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
            }
            GUILayout.Space(15);
            if (function.cruelOutput == null)
            {
                GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
            }
            else
            {
                if (function.realizeCruel)
                {
                    GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
            }
            GUILayout.Space(15);
            if (function.mercantileOutput == null)
            {
                GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
            }
            else
            {
                if (function.realizeMercantile)
                {
                    GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
            }
            GUILayout.Space(15);
            if (function.principledOutput == null)
            {
                GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
            }
            else
            {
                if (function.realizePrincipled)
                {
                    GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
                else
                {
                    GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                }
            }

            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();
            GUILayout.Box("", new GUILayoutOption[] { GUILayout.Height(1), GUILayout.ExpandWidth(true) });
            EditorGUILayout.PropertyField(soFunction.FindProperty("dialog"), GUIContent.none, new GUILayoutOption[] { GUILayout.Width(120) });
            EditorGUILayout.BeginVertical();
            EditorGUILayout.EndVertical();
            if (function.dialog != null)
            {
                int dif = function.dialogOutputs.Count - function.dialog.GetEnds().Count;
                if (dif > 0)
                {
                    for (int i = 0; i < dif; i++)
                    {
                        LogicFunction output = function.dialogOutputs[function.dialogOutputs.Count - 1];
                        if (output != null)
                        {
                            output.SetActionInputLink(null);
                        }
                        function.dialogOutputs.RemoveAt(function.dialogOutputs.Count - 1);
                        function.realizeDialogOutput.RemoveAt(function.dialogOutputs.Count - 1);
                    }
                }
                else if (dif < 0)
                {
                    for (int i = 0; i < -dif; i++)
                    {
                        function.dialogOutputs.Add(null);
                        function.realizeDialogOutput.Add(false);
                    }
                }
                dif = function.dialogOutputs.Count - function.dialogTemper.Count;
                if (dif > 0)
                {
                    for (int i = 0; i < dif; i++)
                    {
                        function.dialogTemper.Add(Temper.NULL);
                    }
                }
                else if (dif < 0)
                {
                    for (int i = 0; i < -dif; i++)
                    {
                        function.dialogTemper.RemoveAt(function.dialogTemper.Count - 1);
                    }
                }
                dif = function.dialogOutputs.Count - function.dialogFileNotes.Count;
                if (dif > 0)
                {
                    for (int i = 0; i < dif; i++)
                    {
                        function.dialogFileNotes.Add(null);
                    }
                }
                else if (dif < 0)
                {
                    for (int i = 0; i < -dif; i++)
                    {
                        function.dialogFileNotes.RemoveAt(function.dialogFileNotes.Count - 1);
                    }
                }

                for (int i = 0; i < function.dialog.GetEnds().Count; i++)
                {
                    EditorGUILayout.BeginHorizontal(new GUILayoutOption[] { GUILayout.Height(20) });
                    EditorGUILayout.LabelField(function.dialog.GetEnds()[i].chooseText, new GUILayoutOption[] { GUILayout.Width(100) });
                    GUILayout.FlexibleSpace();
                    LogicFunction output = function.dialogOutputs[i];
                    EditorGUILayout.BeginVertical();
                    GUILayout.FlexibleSpace();
                    if (output == null)
                    {
                        GUILayout.Box(GUIContent.none, noneActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                    }
                    else if (function.realizeDialogOutput[i])
                    {
                        GUILayout.Box(GUIContent.none, realizeActionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                    }
                    else
                    {
                        GUILayout.Box(GUIContent.none, actionStyle, new GUILayoutOption[] { GUILayout.Width(10), GUILayout.Height(10) });
                    }
                    GUILayout.FlexibleSpace();
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.EndHorizontal();
                }
            }
            else
            {
                for (int i = 0; i < function.dialogOutputs.Count; i++)
                {
                    LogicFunction output = function.dialogOutputs[function.dialogOutputs.Count - 1];
                    if (output != null)
                    {
                        output.SetActionInputLink(null);
                    }
                    function.dialogOutputs.RemoveAt(function.dialogOutputs.Count - 1);
                    function.realizeDialogOutput.RemoveAt(function.dialogOutputs.Count - 1);
                }
            }
            soFunction.ApplyModifiedProperties();
            function.windowRect.height = 160 + 30;
            if (function.dialog != null)
            {
                function.windowRect.height += 20 * function.dialog.GetEnds().Count;
            }
        }
示例#17
0
 private void RealizeFunction(LogicFunction function, bool isTest = false)
 {
     if (function is LogicSplitter)
     {
         List <LogicFunction> outputs = ((LogicSplitter)function).actionOutputs;
         for (int i = 0; i < outputs.Count; i++)
         {
             ((LogicSplitter)function).realizeOutputs[i] = true;
             RealizeFunction(outputs[i], isTest);
         }
     }
     else if (function is DataSplitter)
     {
         DataSplitter dataSplitter = (DataSplitter)function;
         bool         result       = dataSplitter.GetResult();
         if (result)
         {
             dataSplitter.realizeTrue = true;
             RealizeFunction(dataSplitter.trueOutput, isTest);
         }
         else
         {
             dataSplitter.realizeFalse = true;
             RealizeFunction(dataSplitter.falseOutput, isTest);
         }
     }
     else if (function is LogicEffect)
     {
         ((LogicEffect)function).Realize(curOwner, team, isTest);
     }
     else if (function is WaitFunction)
     {
         ((WaitFunction)function).CreateWaitAction(delegate { RealizeFunction(((WaitFunction)function).actionOutput, isTest); });
     }
     else if (function is ChallengeFunction)
     {
         ChallengeFunction challengeFunction = (ChallengeFunction)function;
         challengeFunction.CreateWaitAction(curOwner, delegate
         {
             challengeFunction.realizeTrue  = true;
             challengeFunction.realizeFalse = false;
             if (challengeFunction.trueFileNote != null)
             {
                 curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                 curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(challengeFunction.trueFileNote, curOwner.GetTeam().transform));
             }
             RealizeFunction(challengeFunction.trueOutput, isTest);
         }, delegate {
             challengeFunction.realizeTrue  = false;
             challengeFunction.realizeFalse = true;
             if (challengeFunction.falseFileNote != null)
             {
                 curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                 curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(challengeFunction.falseFileNote, curOwner.GetTeam().transform));
             }
             RealizeFunction(challengeFunction.falseOutput, isTest);
         });
     }
     else if (function is ChooseMethodFunction)
     {
         ChooseMethodFunction methodFunction = (ChooseMethodFunction)function;
         if (methodFunction.dialog == null || !curOwner.GetTeam().GetLeader().IsObedient())
         {
             Method method = methodFunction.Realize(curOwner);
             Debug.Log(string.Format("ChooseMethod - {0}", method.ToString()), methodFunction);
             if (method == Method.Brutal)
             {
                 if (methodFunction.brutalFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(methodFunction.brutalFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(methodFunction.brutalOutput, isTest);
             }
             else if (method == Method.Accuracy)
             {
                 if (methodFunction.carefulFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(methodFunction.carefulFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(methodFunction.carefulOutput, isTest);
             }
             else if (method == Method.Diplomacy)
             {
                 if (methodFunction.diplomatFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(methodFunction.diplomatFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(methodFunction.diplomatOutput, isTest);
             }
             else if (method == Method.Science)
             {
                 if (methodFunction.scienceFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(methodFunction.scienceFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(methodFunction.scienceOutput, isTest);
             }
         }
         else
         {
             Debug.Log(string.Format("ChooseMethod start dialog"), methodFunction);
             UnityAction action = delegate
             {
                 int index = methodFunction.dialog.GetEnds().IndexOf(methodFunction.dialog.end);
                 if (methodFunction.dialogFileNotes[index] != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(methodFunction.dialogFileNotes[index], curOwner.GetTeam().transform));
                 }
                 RealizeFunction(methodFunction.dialogOutputs[index], isTest);
             };
             Dialog.DialogManager.GetInstantiate().StartDialog(methodFunction.dialog, curOwner.GetTeam(), ((iEffectsContainer)curOwner).GetQuest(), action);
         }
     }
     else if (function is ChooseTemperFunction)
     {
         ChooseTemperFunction temperFunction = (ChooseTemperFunction)function;
         if (temperFunction.dialog == null || !curOwner.GetTeam().GetLeader().IsObedient())
         {
             Temper temper = temperFunction.Realize(curOwner);
             Debug.Log(string.Format("ChooseTemper - {0}", temper.ToString()), temperFunction);
             if (temper == Temper.RUDE)
             {
                 if (temperFunction.rudeFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(temperFunction.rudeFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(temperFunction.rudeOutput, isTest);
             }
             else if (temper == Temper.PRUDENT)
             {
                 if (temperFunction.prudentFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(temperFunction.prudentFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(temperFunction.prudentOutput, isTest);
             }
             else if (temper == Temper.MERCIFUL)
             {
                 if (temperFunction.mercifulFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(temperFunction.mercifulFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(temperFunction.mercifulOutput, isTest);
             }
             else if (temper == Temper.CRUEL)
             {
                 if (temperFunction.cruelFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(temperFunction.cruelFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(temperFunction.cruelOutput, isTest);
             }
             else if (temper == Temper.MERCANTILE)
             {
                 if (temperFunction.mercantileFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(temperFunction.mercantileFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(temperFunction.mercantileOutput, isTest);
             }
             else if (temper == Temper.PRINCIPLED)
             {
                 if (temperFunction.principledFileNote != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(temperFunction.principledFileNote, curOwner.GetTeam().transform));
                 }
                 RealizeFunction(temperFunction.principledOutput, isTest);
             }
         }
         else
         {
             Debug.Log(string.Format("ChooseTemper start dialog"), temperFunction);
             UnityAction action = delegate
             {
                 int index = temperFunction.dialog.GetEnds().IndexOf(temperFunction.dialog.end);
                 temperFunction.LoyaltyInfluence(temperFunction.dialogTemper[index], curOwner);
                 if (temperFunction.dialogFileNotes[index] != null)
                 {
                     curOwner.GetTeam().reportQuest.Add(((iEffectsContainer)curOwner).GetQuest());
                     curOwner.GetTeam().reportNotes.Add(FileNoteContainer.Create(temperFunction.dialogFileNotes[index], curOwner.GetTeam().transform));
                 }
                 RealizeFunction(temperFunction.dialogOutputs[index], isTest);
             };
             Dialog.DialogManager.GetInstantiate().StartDialog(temperFunction.dialog, curOwner.GetTeam(), ((iEffectsContainer)curOwner).GetQuest(), action);
         }
     }
 }