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){
|
update(deltaT: number){
|
||||||
if (InputWrapper.getState() != GameState.GAMING) {
|
if (InputWrapper.getState() != GameState.GAMING) {
|
||||||
|
this.owner.animation.pause();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.owner.animation.resume();
|
||||||
super.update(deltaT);
|
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
|
// 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();
|
Input.enableInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DO NOT call this function directly
|
||||||
static setState(gameState: GameState): void {
|
static setState(gameState: GameState): void {
|
||||||
InputWrapper.gameState = gameState;
|
InputWrapper.gameState = gameState;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user