示例#1
0
        /// <summary>
        /// Return true to block the event
        /// </summary>
        public override bool Event(FsmEvent fsmEvent)
        {
            if (firstTime)
            {
                if (!Validate())
                {
                    Finish();
                }

                firstTime = false;
            }

            if (Finished)
            {
                return(false);
            }

            if (Fsm.EventData.SentByState == State || fsmEvent == FsmEvent.Finished)
            {
                return(false);
            }

            var blocked = DoBlockEvent(fsmEvent);

            if (blocked && logBlockedEvents.Value)
            {
                ActionHelpers.DebugLog(Fsm, LogLevel.Info, "Blocked: " + fsmEvent.Name, true);
            }

            return(blocked);
        }
示例#2
0
 public override void OnEnter()
 {
     if (!string.IsNullOrEmpty(text.Value))
     {
         ActionHelpers.DebugLog(base.Fsm, logLevel, text.Value, sendToUnityLog);
     }
     Finish();
 }
示例#3
0
 public override void OnEnter()
 {
     if (!string.IsNullOrEmpty(this.text.Value))
     {
         ActionHelpers.DebugLog(base.Fsm, this.logLevel, this.text.Value);
     }
     base.Finish();
 }
示例#4
0
 public override void OnEnter()
 {
     spectrum = UnityEngine.Object.FindObjectOfType <AudioSpectrum>();
     if (null == spectrum)
     {
         ActionHelpers.DebugLog(Fsm, LogLevel.Error, "AudioSpectrum not found.", true);
         Finish();
     }
 }
示例#5
0
        public override void OnEnter()
        {
            string text = "None";

            if (!gameObject.IsNone)
            {
                text = gameObject.Name + ": " + gameObject;
            }
            ActionHelpers.DebugLog(base.Fsm, logLevel, text, sendToUnityLog);
            Finish();
        }
示例#6
0
        public override void OnEnter()
        {
            string text = "None";

            if (!vector2Variable.IsNone)
            {
                text = vector2Variable.Name + ": " + vector2Variable.Value;
            }
            ActionHelpers.DebugLog(base.Fsm, logLevel, text);
            Finish();
        }
示例#7
0
        /// <summary>
        /// Return true to block the event
        /// </summary>
        public override bool Event(FsmEvent fsmEvent)
        {
            var ignored = DoIgnoreEvent(fsmEvent);

            if (ignored && logIgnoredEvents.Value)
            {
                ActionHelpers.DebugLog(Fsm, LogLevel.Info, "Ignored: " + fsmEvent.Name, true);
            }

            return(ignored);
        }
示例#8
0
        public override void OnEnter()
        {
            string text = "None";

            if (!floatVariable.IsNone)
            {
                text = floatVariable.Name + ": " + floatVariable.Value;
            }
            ActionHelpers.DebugLog(base.Fsm, logLevel, text, sendToUnityLog);
            Finish();
        }
示例#9
0
        public override void OnEnter()
        {
            string text = "None";

            if (!this.gameObject.IsNone)
            {
                text = this.gameObject.Name + ": " + this.gameObject;
            }
            ActionHelpers.DebugLog(base.Fsm, this.logLevel, text);
            base.Finish();
        }
示例#10
0
        public override void OnEnter()
        {
            string text = "None";

            if (!this.floatVariable.IsNone)
            {
                text = this.floatVariable.Name + ": " + this.floatVariable.Value;
            }
            ActionHelpers.DebugLog(base.Fsm, this.logLevel, text);
            base.Finish();
        }
示例#11
0
        public override void OnEnter()
        {
            var text = "None";

            if (!fsmObject.IsNone)
            {
                text = fsmObject.Name + ": " + fsmObject;
            }

            ActionHelpers.DebugLog(Fsm, logLevel, text, sendToUnityLog);

            Finish();
        }
示例#12
0
        public override void OnEnter()
        {
            var text = "None";

            if (!vector3Variable.IsNone)
            {
                text = vector3Variable.Name + ": " + vector3Variable.Value;
            }

            ActionHelpers.DebugLog(Fsm, logLevel, text, sendToUnityLog);

            Finish();
        }
示例#13
0
        public override void OnEnter()
        {
            string text = "None";

            if (!gameObject.IsNone)
            {
                text = gameObject.Name + ": " + gameObject.ToString();
            }

            ActionHelpers.DebugLog(Fsm, logLevel, text);

            Finish();
        }
示例#14
0
        public override void OnEnter()
        {
            var text = "None";

            if (!boolVariable.IsNone)
            {
                text = boolVariable.Name + ": " + boolVariable.Value;
            }

            ActionHelpers.DebugLog(Fsm, logLevel, text);

            Finish();
        }
示例#15
0
 public override void OnEnter()
 {
     ActionHelpers.DebugLog(base.Fsm, this.logLevel, this.fsmVar.DebugString());
     base.Finish();
 }
示例#16
0
        public override void OnEnter()
        {
            ActionHelpers.DebugLog(Fsm, logLevel, fsmVar.DebugString());

            Finish();
        }
示例#17
0
        public override void OnEnter()
        {
            ActionHelpers.DebugLog(Fsm, logLevel, variable.DebugString(), sendToUnityLog);

            Finish();
        }