Exemplo n.º 1
0
        public FsmLayerStateMachine(IFSMController _controller, string _name, bool isTopStateMachine)
        {
            if (_controller == null)
            {
                Debug.LogError("FsmStateMachine " + _name + " IFSMController Can't Be Null");
                return;
            }
            FsmController    = _controller;
            StateMachineName = _name + "_StateMachine";


            DefaultState      = new FsmState(this, StateMachineName + "_defaultState ", null, null);
            IsTopStateMachine = isTopStateMachine;

            if (IsTopStateMachine)
            {
                FsmController.SetTopStateMachine(this);
            }

#if UNITY_EDITOR
            _ShowName = _name;
            ShowAllTrans.Clear();
            _IsTopStateMachine = IsTopStateMachine;
#endif
        }
 public FsmTransParameter(IFSMController _controller, string _name)
 {
     FsmTransParameterName = _name;
     if (_controller == null)
     {
         Debug.LogError("FSMTransParameter " + _name + " IFSMController Can't Be Null");
         return;
     }
     FsmController = _controller;
 }
Exemplo n.º 3
0
		private FSMController GetControllerMock(IFSMController iFsm) {
			var fController = Substitute.For<FSMController> ();
			fController.SetFSMController (iFsm);
			return fController;
		}
Exemplo n.º 4
0
		[SetUp] public void Init()
		{ 
			iFsm = GetFsmMock ();
			fController = GetControllerMock (iFsm);	
		}
Exemplo n.º 5
0
		public void SetFSMController(IFSMController fsmController) {
			this.fsmController = fsmController;
		}