コード例 #1
0
ファイル: EventCenter.cs プロジェクト: csuffyy/EventNext
        public Task <IEventOutput> Execute(IEventInput input)
        {
            EventCompleted eventCompleted = new EventCompleted();

            Execute(input, eventCompleted);
            return(eventCompleted.GetTask());
        }
コード例 #2
0
        public static MethodResult ToggleSwitch(object sender, IEventInput input)
        {
            var sInput = (StringInput)input;

            Systems.DataManager.ToggleSwitch(sInput.Input);
            return(MethodResult.Success);
        }
コード例 #3
0
ファイル: EventCenter.cs プロジェクト: xman086/EventNext
        public void Execute(IEventInput input, IEventCompleted callBackEvent)
        {
            if (input.ID == 0)
            {
                input.ID = GetInputID();
            }
            EventOutput output = new EventOutput();

            output.Token      = input.Token;
            output.ID         = input.ID;
            output.EventError = EventError.Success;
            EventActionHandler handler = GetActionHandler(input.EventPath);

            if (handler == null)
            {
                output.EventError = EventError.NotFound;
                output.Data       = new object[] { $"Process event error {input.EventPath} not found!" };
                if (EnabledLog(LogType.Warring))
                {
                    Log(LogType.Warring, $"[{input.ID}]{input.Token} Process event error {input.EventPath} not found!");
                }
                callBackEvent.Completed(output);
            }
            else
            {
                OnExecute(input, output, handler, callBackEvent);
            }
        }
コード例 #4
0
        public static MethodResult TurnOffSwitch(object sender, IEventInput input)
        {
            var sInput = (StringInput)input;

            Systems.DataManager.TurnOffSwitch(sInput.Input);
            return(MethodResult.False);
        }
コード例 #5
0
        public static MethodResult TurnOnSwitch(object sender, IEventInput input)
        {
            var sInput = (StringInput)input;

            EngineGlobals.DataManager.TurnOnSwitch(sInput.Input);
            return(MethodResult.True);
        }
コード例 #6
0
ファイル: EventDispatchProxy.cs プロジェクト: zouql/EventNext
        protected void OnEventInvoke(IAnyCompletionSource e, IEventInput input, IEventOutput output)
        {
            ProxyOutputWork resultWork = new ProxyOutputWork {
                CompletionSource = e, EventCenter = EventCenter, Input = input, Output = output, EventDispatchProxy = this
            };

            EventCenter.OutputNextQueue.Enqueue(resultWork, EventCenter.NextQueueWaits);
        }
コード例 #7
0
        public static MethodResult Wait(object sender, IEventInput input)
        {
            IntInput IInput = (IntInput)input;

            System.Threading.Thread.Sleep(IInput.Input);

            return(MethodResult.Success);
        }
コード例 #8
0
 public EventActionHandlerContext(EventCenter server, IEventInput input, EventActionHandler handler, object controller, NextQueue nextQueue)
 {
     Input       = input;
     EventCenter = server;
     Handler     = handler;
     Controller  = controller;
     NextQueue   = nextQueue;
 }
コード例 #9
0
        public static MethodResult CreateVariable(object sender, IEventInput input)
        {
            var vInput = (CreateVariableInput)input;

            Variable newVar = new Variable(vInput.Value);

            DataManager.SetVariable(vInput.Name, newVar);
            return(MethodResult.Success);
        }
コード例 #10
0
        public static MethodResult ShowMessageBox(object sender, IEventInput input)
        {
            var    sInput = (StringInput)input;
            string _lines = sInput.Input;
            var    screen = new SystemScreens.MessageBoxScreen(_lines, Current_ActionList);

            GameReference.State_Manager.AddScreen(screen);
            return(MethodResult.Success);
        }
コード例 #11
0
        /// <summary>
        /// Starts a battle sequence
        /// </summary>
        /// <param name="sender">The object that sent the request </param>
        /// <param name="input">A BattleInput, this will hold information on enemies in battle, 
        /// and spoils, as well as info about the type of battle</param>
        public static MethodResult InitiateBattle(object sender, IEventInput input)
        {
            if (sender is GameData.Map.Character.Enemy.Enemy)
            {

            }
            var bScreen = new Screens.BattleScreen();
            StateManager.AddScreenLoad(bScreen);
            return MethodResult.Success;
        }
コード例 #12
0
        public static MethodResult WaitForInput(object sender, IEventInput input)
        {
            ControlInput controlInput = (ControlInput)input;

            while (!controlInput.Control.Value)
            {
                System.Threading.Thread.Sleep(10);
            }
            return(MethodResult.Success);
        }
コード例 #13
0
 public EventActionHandlerContext(EventCenter server, IEventInput input, EventActionHandler handler, object controller, NextQueue nextQueue,
                                  ActorCollection.ActorItem actorItem)
 {
     Input       = input;
     EventCenter = server;
     Handler     = handler;
     Controller  = controller;
     NextQueue   = nextQueue;
     ActorItem   = actorItem;
 }
コード例 #14
0
        /// <summary>
        /// Starts a battle sequence
        /// </summary>
        /// <param name="sender">The object that sent the request </param>
        /// <param name="input">A BattleInput, this will hold information on enemies in battle,
        /// and spoils, as well as info about the type of battle</param>
        public static MethodResult InitiateBattle(object sender, IEventInput input)
        {
            if (sender is GameData.Map.Character.Enemy.Enemy)
            {
            }
            var bScreen = new Screens.BattleScreen();

            StateManager.AddScreenLoad(bScreen);
            return(MethodResult.Success);
        }
コード例 #15
0
        public static MethodResult ShowMessageBox(object sender, IEventInput input)
        {
            var    sInput = (StringInput)input;
            string _lines = sInput.Input;
            var    screen = new SystemScreens.MessageBoxScreen(_lines);

            GameReference.State_Manager.AddScreen(screen);
            while (screen.Result != MethodResult.Yes)
            {
                System.Threading.Thread.Sleep(100);
            }
            return(MethodResult.Success);
        }
コード例 #16
0
        public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var gold = EngineGlobals.DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();
            if (input is IntInput)
                temp = (IntInput)input;
            else
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";

            var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);

            GameReference.WidgetDrawer.AddWidget(newGoldDisplay);

            gold.AsInt += temp.Input;
            return MethodResult.Success;
        }
コード例 #17
0
        public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var gold = DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();
            if (input is IntInput)
                temp = (IntInput)input;
            else
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";

            if (sender is Achievement /*|| sender is Objects.GameObjects.NPC*/)
            {
                var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);
                GameReference.WidgetDrawer.AddWidget(newGoldDisplay);
            }

            gold.AsInt += temp.Input;
            TryContinueList();
            return MethodResult.Success;
        }
コード例 #18
0
ファイル: EventCenter.cs プロジェクト: csuffyy/EventNext
        public void Execute(IEventInput input, IEventCompleted callBackEvent)
        {
            if (input.ID == 0)
            {
                input.ID = GetInputID();
            }
            EventOutput output = new EventOutput();

            output.Token      = input.Token;
            output.ID         = input.ID;
            output.EventError = EventError.Success;
            EventActionHandler handler = GetActionHandler(input.EventPath);

            if (handler == null)
            {
                output.EventError = EventError.NotFound;
                output.Data       = new object[] { $"Process event error {input.EventPath} not found!" };
                if (EnabledLog(LogType.Warring))
                {
                    Log(LogType.Warring, $"{input.Token} Process event error {input.EventPath} not found!");
                }
                callBackEvent.Completed(output);
            }
            else
            {
                try
                {
                    OnExecute(input, output, handler, callBackEvent);
                }
                catch (Exception e_)
                {
                    output.EventError = EventError.InnerError;
                    output.Data       = new object[] { $"Process event {input.EventPath} error {e_.Message}" };
                    if (EnabledLog(LogType.Error))
                    {
                        Log(LogType.Error, $"{input.Token} process event {input.EventPath} error {e_.Message}@{e_.StackTrace}");
                    }
                    callBackEvent.Completed(output);
                }
            }
        }
コード例 #19
0
        public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var      gold = EngineGlobals.DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();

            if (input is IntInput)
            {
                temp = (IntInput)input;
            }
            else
            {
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";
            }

            var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);


            GameReference.WidgetDrawer.AddWidget(newGoldDisplay);


            gold.AsInt += temp.Input;
            return(MethodResult.Success);
        }
コード例 #20
0
        public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var      gold = DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();

            if (input is IntInput)
            {
                temp = (IntInput)input;
            }
            else
            {
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";
            }

            if (sender is Achievement /*|| sender is Objects.GameObjects.NPC*/)
            {
                var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);
                GameReference.WidgetDrawer.AddWidget(newGoldDisplay);
            }

            gold.AsInt += temp.Input;
            TryContinueList();
            return(MethodResult.Success);
        }
コード例 #21
0
 public virtual bool Executing(EventCenter center, EventActionHandler handler, IEventInput input, IEventOutput output)
 {
     return(true);
 }
コード例 #22
0
 public override void Executed(EventCenter center, EventActionHandler handler, IEventInput input, IEventOutput output)
 {
     base.Executed(center, handler, input, output);
     Console.WriteLine($"{input.EventPath} executed");
 }
コード例 #23
0
 public static MethodResult AddCutSceneActor(object sender, IEventInput input)
 {
     return MethodResult.Success;
 }
コード例 #24
0
        public static MethodResult Wait(object sender, IEventInput input)
        {
            IntInput IInput = (IntInput)input;

            System.Threading.Thread.Sleep(IInput.Input);

            return MethodResult.Success;
        }
コード例 #25
0
 public static MethodResult ToggleSwitch(object sender, IEventInput input)
 {
     var sInput = (StringInput)input;
     EngineGlobals.DataManager.ToggleSwitch(sInput.Input);
     return MethodResult.Success;
 }
コード例 #26
0
 public static MethodResult ShowDialogueChoice(object sender, IEventInput input)
 {
     return MethodResult.No;
 }
コード例 #27
0
        public static MethodResult CreateVariable(object sender, IEventInput input)
        {
            var vInput = (CreateVariableInput)input;

            Variable newVar = new Variable(vInput.Value);

            DataManager.SetVariable(vInput.Name, newVar);
            return MethodResult.Success;
        }
コード例 #28
0
 /// <summary>
 /// Starts a battle sequence
 /// </summary>
 /// <param name="sender">The object that sent the request </param>
 /// <param name="input">A BattleInput, this will hold information on enemies in battle, 
 /// and spoils, as well as info about the type of battle</param>
 public static MethodResult InitiateBattle(object sender, IEventInput input)
 {
     //var bScreen = new SystemScreens.BattleScreen("level.level");
     return MethodResult.Success;
 }
コード例 #29
0
 /// <summary>
 /// Starts a battle sequence
 /// </summary>
 /// <param name="sender">The object that sent the request </param>
 /// <param name="input">A BattleInput, this will hold information on enemies in battle,
 /// and spoils, as well as info about the type of battle</param>
 public static MethodResult InitiateBattle(object sender, IEventInput input)
 {
     //var bScreen = new SystemScreens.BattleScreen("level.level");
     return(MethodResult.Success);
 }
コード例 #30
0
        public static void Wait(object sender, IEventInput input)
        {
            IntInput IInput = (IntInput)input;

            System.Threading.Thread.Sleep(IInput.Input);
        }
コード例 #31
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        public static void Condition(object sender, IEventInput input)
        {
            if (!(input is ConditionInput))
            {
                ConsoleWindow.WriteLine("Invalid input passed to Condition method");
            }

            var  cInput = (ConditionInput)input;
            var  v1     = cInput.InputA as Variable;
            var  v2     = cInput.InputB as Variable;
            bool path1  = false;
            bool path2;

            switch (cInput.Comparison)
            {
            case CompareType.Var_Var:
            case CompareType.Var_Gold:
                if (cInput.CheckValue == CheckValue.ValueEqual)
                {
                    if (v1.Value == v2.Value)
                    {
                        path1 = true;
                    }
                }
                else if (cInput.CheckValue == CheckValue.ValueGreater)
                {
                    if (v1.AsInt > v2.AsInt)
                    {
                        path1 = true;
                    }
                }
                else if (cInput.CheckValue == CheckValue.ValueGreaterEqual)
                {
                    if (v1.AsInt >= v2.AsInt)
                    {
                        path1 = true;
                    }
                }
                else if (cInput.CheckValue == CheckValue.ValueLess)
                {
                    if (v1.AsInt < v2.AsInt)
                    {
                        path1 = true;
                    }
                }
                else if (cInput.CheckValue == CheckValue.ValueLessEqual)
                {
                    if (v1.AsInt <= v2.AsInt)
                    {
                        path1 = true;
                    }
                }
                break;

            case CompareType.Var_String:
                if (cInput.CheckValue == CheckValue.ValueEqual)
                {
                    if (v1.Value == v2.Value)
                    {
                        path1 = true;
                    }
                }
                break;

            case CompareType.Switch_Val:
                break;
            }
            path2 = !path1 && cInput.HasElse;
            if (path1)      //Conditional complete route
            {
                //cInput.Path1.OldList = Current_ActionList;
                Current_ActionList.ExecuteList(cInput.Path1);
            }
            else if (path2) //Else route
            {
                Current_ActionList.ExecuteList(cInput.Path2);
            }
        }
コード例 #32
0
 public override bool Executing(EventCenter center, EventActionHandler handler, IEventInput input, IEventOutput output)
 {
     output.EventError = EventError.NotFound;
     output.Data       = new object[] { $"{input.EventPath} not found!" };
     return(false);
 }
コード例 #33
0
 public virtual void Executed(EventCenter center, EventActionHandler handler, IEventInput input, IEventOutput output)
 {
 }
コード例 #34
0
 public static MethodResult ShowDialogueChoice(object sender, IEventInput input)
 {
     return(MethodResult.Success);
 }
コード例 #35
0
        /// <summary>
        /// Checks internal variables and switches for their values and alternates method paths on the result
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        public static MethodResult Condition(object sender, IEventInput input)
        {
            if (!(input is ConditionInput))
            {
                ConsoleWindow.WriteLine("Invalid input passed to Condition method");
            }

            var cInput = (ConditionInput)input;

            switch (cInput.Comparison)  //Check the comparison type
            {
                case CompareType.Var_Var:
                case CompareType.Var_Gold:
                    {
                        var v1 = cInput.InputA as Variable;     //Turn the inputs into variables
                        var v2 = cInput.InputB as Variable;
                        switch (cInput.CheckValue)
                        {

                            case CheckValue.ValueEqual:
                                return v1.Value == v2.Value ? MethodResult.True : MethodResult.False;   //Check if Value A is the same
                            case CheckValue.ValueGreater:
                                return v1.AsInt > v2.AsInt ? MethodResult.True : MethodResult.False;    //Check if Value A is greater than value B
                            case CheckValue.ValueGreater | CheckValue.ValueEqual:
                                return v1.AsInt >= v2.AsInt ? MethodResult.True : MethodResult.False;   //Check if Value A is greater or equal to value B
                            case CheckValue.ValueLess:
                                return v1.AsInt < v2.AsInt ? MethodResult.True : MethodResult.False;    //Check if Value A is less than value B
                            case CheckValue.ValueLess | CheckValue.ValueEqual:
                                return v1.AsInt <= v2.AsInt ? MethodResult.True : MethodResult.False;   //Check if Value A is less than or equal to value B
                        }
                    }
                    return MethodResult.Fail;       //If none of those were compared then it's a fail flag
                case CompareType.Var_String:
                    {
                        var v1 = cInput.InputA as Variable;                 //Compare the variables as strings
                        var v2 = cInput.InputB as Variable;
                        if (cInput.CheckValue == CheckValue.ValueEqual)
                        {
                            return v1.AsString == v2.AsString ? MethodResult.True : MethodResult.False;
                        }
                    }
                    break;
                case CompareType.Switch_Val:
                    {
                        var s1 = cInput.InputA as Switch;
                        if (cInput.CheckValue == CheckValue.ValueON)
                        {
                            return s1.Value ? MethodResult.True : MethodResult.False;
                        }
                        if (cInput.CheckValue == CheckValue.ValueOFF)
                        {
                            return s1.Value ? MethodResult.False : MethodResult.True;
                        }
                        if (cInput.CheckValue == CheckValue.ValueEqual)
                        {
                            var s2 = cInput.InputB as Switch;
                            return s1.Value == s2.Value ? MethodResult.True : MethodResult.False;
                        }
                    }
                    break;
            }
            return MethodResult.Fail;
        }
コード例 #36
0
 public static void ChangeMusic(object sender, IEventInput input)
 {
     //var aInput = input as AudioInput;
 }
コード例 #37
0
 public static MethodResult ModifyVariables(object sender, IEventInput input)
 {
     if (input is IntModInput)
     {
         var temp = (IntModInput)input;
         switch (temp.AdjustmentType)
         {
             case AdjustType.Addition:
                 temp.VarInput += temp.IntInput;
                 break;
             case AdjustType.Subtract:
                 temp.VarInput -= temp.IntInput;
                 break;
             case AdjustType.Multiply:
                 temp.VarInput *= temp.IntInput;
                 break;
             case AdjustType.Divide:
                 temp.VarInput /= temp.IntInput;
                 break;
             case AdjustType.Modulus:
                 temp.VarInput %= temp.IntInput;
                 break;
             case AdjustType.Set:
                 Variable.Set(temp.VarInput, temp.IntInput);
                 break;
             case AdjustType.SetToGold:
                 Variable.Set(temp.VarInput, EngineGlobals.DataManager.GetVariable("{gold}").AsInt);
                 break;
             case AdjustType.SetToPlayerX:
                 break;
             case AdjustType.SetToPlayerY:
                 break;
         }
     }
     else if (input is VariableModInput)
     {
         var temp = (VariableModInput)input;
         switch (temp.AdjustmentType)
         {
             case AdjustType.Addition:
                 temp.InputL.AsInt += temp.InputR.AsInt;
                 break;
             case AdjustType.Subtract:
                 temp.InputL.AsInt -= temp.InputR.AsInt;
                 break;
             case AdjustType.Multiply:
                 temp.InputL.AsInt *= temp.InputR.AsInt;
                 break;
             case AdjustType.Divide:
                 temp.InputL.AsInt /= temp.InputR.AsInt;
                 break;
             case AdjustType.Modulus:
                 temp.InputL.AsInt %= temp.InputR.AsInt;
                 break;
             case AdjustType.Set:
                 temp.InputL.Value = temp.InputR.Value;
                 break;
         }
     }
     return MethodResult.Success;
 }
コード例 #38
0
 public static void ListErase(object sender, IEventInput input)
 {
     Current_ActionList = null;
 }
コード例 #39
0
 public static MethodResult ShowMessageBox(object sender, IEventInput input)
 {
     var sInput = (StringInput)input;
     string _lines = sInput.Input;
     var screen = new SystemScreens.MessageBoxScreen(_lines);
     GameReference.State_Manager.AddScreen(screen);
     while (screen.Result != MethodResult.Yes)
     {
         System.Threading.Thread.Sleep(100);
     }
     return MethodResult.Success;
 }
コード例 #40
0
 public static void ChangeMusic(object sender, IEventInput input)
 {
     //var aInput = input as AudioInput;
 }
コード例 #41
0
 public static MethodResult TurnOnSwitch(object sender, IEventInput input)
 {
     var sInput = (StringInput)input;
     EngineGlobals.DataManager.TurnOnSwitch(sInput.Input);
     return MethodResult.True;
 }
コード例 #42
0
 public static void Wait(object sender,IEventInput input)
 {
     IntInput IInput = (IntInput)input;
     System.Threading.Thread.Sleep(IInput.Input);
 }
コード例 #43
0
 public static MethodResult WaitForInput(object sender, IEventInput input)
 {
     ControlInput controlInput = (ControlInput)input;
     while (!controlInput.Control.Value)
     {
         System.Threading.Thread.Sleep(10);
     }
     return MethodResult.Success;
 }
コード例 #44
0
        public static MethodResult ModifyVariables(object sender, IEventInput input)
        {
            if (input is IntModInput)
            {
                var temp = (IntModInput)input;
                switch (temp.AdjustmentType)
                {
                case AdjustType.Addition:
                    temp.VarInput += temp.IntInput;
                    break;

                case AdjustType.Subtract:
                    temp.VarInput -= temp.IntInput;
                    break;

                case AdjustType.Multiply:
                    temp.VarInput *= temp.IntInput;
                    break;

                case AdjustType.Divide:
                    temp.VarInput /= temp.IntInput;
                    break;

                case AdjustType.Modulus:
                    temp.VarInput %= temp.IntInput;
                    break;

                case AdjustType.Set:
                    Variable.Set(temp.VarInput, temp.IntInput);
                    break;

                case AdjustType.SetToGold:
                    Variable.Set(temp.VarInput, Systems.DataManager.GetVariable("{gold}").AsInt);
                    break;

                case AdjustType.SetToPlayerX:
                    break;

                case AdjustType.SetToPlayerY:
                    break;
                }
            }
            else if (input is VariableModInput)
            {
                var temp = (VariableModInput)input;
                switch (temp.AdjustmentType)
                {
                case AdjustType.Addition:
                    temp.InputL.AsInt += temp.InputR.AsInt;
                    break;

                case AdjustType.Subtract:
                    temp.InputL.AsInt -= temp.InputR.AsInt;
                    break;

                case AdjustType.Multiply:
                    temp.InputL.AsInt *= temp.InputR.AsInt;
                    break;

                case AdjustType.Divide:
                    temp.InputL.AsInt /= temp.InputR.AsInt;
                    break;

                case AdjustType.Modulus:
                    temp.InputL.AsInt %= temp.InputR.AsInt;
                    break;

                case AdjustType.Set:
                    temp.InputL.Value = temp.InputR.Value;
                    break;
                }
            }
            return(MethodResult.Success);
        }
コード例 #45
0
ファイル: Program.cs プロジェクト: zhouzu/XRPC
        public override bool Executing(EventCenter center, EventActionHandler handler, IEventInput input, IEventOutput output)
        {
            string token = null;

            input.Properties?.TryGetValue("token", out token);
            var user = JWTHelper.Default.GetUserInfo(token);

            if (user != null)
            {
                return(base.Executing(center, handler, input, output));
            }
            else
            {
                output.EventError = EventError.InnerError;
                output.Data       = new object[] { "操作错误,无权操作相关资源!" };
                return(false);
            }
        }
コード例 #46
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        public static void Condition(object sender, IEventInput input)
        {
            if (!(input is ConditionInput))
            {
                ConsoleWindow.WriteLine("Invalid input passed to Condition method");
            }

            var cInput = (ConditionInput)input;
            var v1 = cInput.InputA as Variable;
            var v2 = cInput.InputB as Variable;
            bool path1 = false;
            bool path2;
            switch (cInput.Comparison)
            {
                case CompareType.Var_Var:
                case CompareType.Var_Gold:
                    if (cInput.CheckValue == CheckValue.ValueEqual)
                    {
                        if (v1.Value == v2.Value)
                            path1 = true;
                    }
                    else if (cInput.CheckValue == CheckValue.ValueGreater)
                    {
                        if (v1.AsInt > v2.AsInt)
                            path1 = true;
                    }
                    else if (cInput.CheckValue == CheckValue.ValueGreaterEqual)
                    {
                        if (v1.AsInt >= v2.AsInt)
                            path1 = true;
                    }
                    else if (cInput.CheckValue == CheckValue.ValueLess)
                    {
                        if (v1.AsInt < v2.AsInt)
                            path1 = true;
                    }
                    else if (cInput.CheckValue == CheckValue.ValueLessEqual)
                    {
                        if (v1.AsInt <= v2.AsInt)
                            path1 = true;
                    }
                    break;
                case CompareType.Var_String:
                    if (cInput.CheckValue == CheckValue.ValueEqual)
                    {
                        if (v1.Value == v2.Value)
                            path1 = true;
                    }
                    break;
                case CompareType.Switch_Val:
                    break;
            }
            path2 = !path1 && cInput.HasElse;
            if (path1)      //Conditional complete route
            {
                //cInput.Path1.OldList = Current_ActionList;
                Current_ActionList.ExecuteList(cInput.Path1);
            }
            else if (path2) //Else route
            {
                Current_ActionList.ExecuteList(cInput.Path2);
            }
        }
コード例 #47
0
 public static MethodResult ShowMessageBox(object sender, IEventInput input)
 {
     var sInput = (StringInput)input;
     string _lines = sInput.Input;
     var screen = new SystemScreens.MessageBoxScreen(_lines, Current_ActionList);
     GameReference.State_Manager.AddScreen(screen);
     return MethodResult.Success;
 }
コード例 #48
0
 public static MethodResult TurnOffSwitch(object sender, IEventInput input)
 {
     var sInput = (StringInput)input;
     Systems.DataManager.TurnOffSwitch(sInput.Input);
     return MethodResult.False;
 }
コード例 #49
0
 public static MethodResult AddCutSceneActor(object sender, IEventInput input)
 {
     return(MethodResult.Success);
 }
コード例 #50
0
 public static void ListErase(object sender, IEventInput input)
 {
     Current_ActionList = null;
 }