コード例 #1
0
 void Update()
 {
     newState = currentState.DoState(this);
     if (newState != currentState)
     {
         currentState = newState;
         currentState.InitState(this);
     }
 }
コード例 #2
0
 void Start()
 {
     currentState = playerTurnState;
     isPlayerTurn = true;
     currentState.InitState(this);
     FindObjectOfType <UI_AnimController>().skipTurnDelegate += () => isPlayerTurn = false;
     FindObjectOfType <BossStateManager>().endBossTurn       += () => isPlayerTurn = true;
     //go create the enemyAISTATE MACHINE.
     //FindObjectOfType<EnemyAIStateMachine>().attackOverDelegate += () => isPlayerTurn = true;
 }