fix: mobile animation
This commit is contained in:
parent
0546abbf08
commit
20d3daebc3
|
@ -95,6 +95,21 @@ export default () => class Mobile extends decorate(Trait) {
|
|||
}
|
||||
}
|
||||
|
||||
listeners() {
|
||||
return {
|
||||
|
||||
isMobileChanged: () => {
|
||||
if (!this.entity.isMobile || Vector.isZero(this.actionMovement)) {
|
||||
this.entity.currentAnimation = 'idle';
|
||||
}
|
||||
else {
|
||||
this.entity.currentAnimation = 'moving';
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
methods() {
|
||||
return {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user