コード例 #1
0
ファイル: BaseFSM.cs プロジェクト: DlotFire/MosterSpawn
 public void Update()
 {
     //currentState.Reason(this);
     //currentState.Action(this);
     if (currentState != null)
     {
         //当前状态下的行为
         currentState.Action(this);
         //当前状态下转换条件的检测
         currentState.Reason(this);
     }
 }
コード例 #2
0
ファイル: FSMSystem.cs プロジェクト: WHYingg/MG2020
 public void OnUpdate(GameObject npc)
 {
     currentState.Action(npc);
     currentState.Reason(npc);
 }