private void SwitchStopTriggerHandler(TriggerActionArgs args)
        {
            var context = args.Context;

            var effect = args.Trigger.Effect;

            context.ChangeState(StopState.Instance, effect);
        }
        private void SubContextTriggerHandler(TriggerActionArgs args)
        {
            var trigger = args.Trigger;

            var context = this.SubContext;

            context.SendTrigger(trigger);
        }
示例#3
0
        public void SendTrigger(StateMachine context, Trigger trigger)
        {
            if (this.TriggerActionMap.ContainsKey(trigger.Name) == true)
            {
                Messenger.Send($"Trigger : {trigger.Name}");

                var action = this.TriggerActionMap[trigger.Name];

                var args = new TriggerActionArgs(context, trigger);

                action(args);
            }
        }
        private void SwitchCleanTriggerHandler(TriggerActionArgs args)
        {
            var context = args.Context;

            context.ChangeState(CleanState.Instance);
        }
示例#5
0
        private void InitializedTriggerHandler(TriggerActionArgs args)
        {
            var context = args.Context;

            context.ChangeState(StopState.Instance);
        }
示例#6
0
        private void SwitchStartTriggerHandler(TriggerActionArgs args)
        {
            var context = args.Context;

            context.ChangeState(RunningState.Instance);
        }