Example #1
0
 void Update()
 {
     newState = currentState.DoState(this);
     if (newState != currentState)
     {
         currentState = newState;
         currentState.InitState(this);
     }
 }
Example #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;
 }