fun: moveFor shouldn't set direction
This commit is contained in:
parent
372f0b9a3b
commit
24f944d762
|
@ -30,7 +30,7 @@ export class Mobile extends decorate(Trait) {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
moveFor: (duration) => {
|
moveFor: (duration) => {
|
||||||
const direction = Math.floor(Math.random() * 4);
|
const direction = this.entity.direction;
|
||||||
let resolve;
|
let resolve;
|
||||||
const promise = new TickingPromise(_resolve => resolve = _resolve);
|
const promise = new TickingPromise(_resolve => resolve = _resolve);
|
||||||
promise.ticker = (elapsed) => {
|
promise.ticker = (elapsed) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user