feat: pause animation

This commit is contained in:
Renge 2022-04-17 16:27:47 -04:00
parent 7a1d6c668e
commit 88535c4529
2 changed files with 3 additions and 0 deletions

View File

@ -183,8 +183,10 @@ export default class EnemyAI extends StateMachineGoapAI implements BattlerAI {
update(deltaT: number){
if (InputWrapper.getState() != GameState.GAMING) {
this.owner.animation.pause();
return;
}
this.owner.animation.resume();
super.update(deltaT);
// This is the plan that is executed in the Active state, so whenever we don't have a plan, acquire a new one given the current statuses the enemy has

View File

@ -148,6 +148,7 @@ export default class InputWrapper {
Input.enableInput();
}
// DO NOT call this function directly
static setState(gameState: GameState): void {
InputWrapper.gameState = gameState;
}