chore: tidy
This commit is contained in:
parent
16dffe6855
commit
5059525ca3
|
@ -167,11 +167,9 @@ export default () => class Mobile extends decorate(Trait) {
|
||||||
if (!this.entity.isMobile) {
|
if (!this.entity.isMobile) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.entity.applyMovement(Vector.scale(
|
const movement = Vector.scale(Vector.saturate(vector), this.speed);
|
||||||
Vector.saturate(vector),
|
this.entity.applyMovement(movement);
|
||||||
this.speed,
|
this.entity.emit('movementRequest', movement);
|
||||||
));
|
|
||||||
this.entity.emit('movementRequest', this.#appliedMovement);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user