fun: moveFor shouldn't set direction

This commit is contained in:
cha0s 2019-05-26 12:01:58 -05:00
parent 372f0b9a3b
commit 24f944d762

View File

@ -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) => {