feat: pause animation
This commit is contained in:
parent
7a1d6c668e
commit
88535c4529
|
@ -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
|
||||
|
|
|
@ -148,6 +148,7 @@ export default class InputWrapper {
|
|||
Input.enableInput();
|
||||
}
|
||||
|
||||
// DO NOT call this function directly
|
||||
static setState(gameState: GameState): void {
|
||||
InputWrapper.gameState = gameState;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user