Exemple #1
0
 public void Update()
 {
     //当前状态的行为
     currentState.Action(this);
     //当前状态的条件检测
     currentState.Reason(this);
 }
Exemple #2
0
 //配置状态机,创建状态对象,设置状态
 private void Update()
 {
     //test_CurrentStateID = currentState.StateID;
     //判断当前状态并执行
     currentState.Reason(this);
     currentState.ActionState(this);
     SearchTarget();
 }
Exemple #3
0
 public void Update()
 {
     if (currentState != null)
     {
         //当前状态下的行为
         currentState.Action(this);
         //当前状态下转换条件的检测
         currentState.Reason(this);
     }
 }
Exemple #4
0
 void Update()
 {
     currentState.Reason(this);
     currentState.ActionState(this);
 }