Player class is no longer dependent on UserInputManager

This commit is contained in:
Hanusiak Piotr 2022-01-17 11:37:28 +01:00
parent 173d10738d
commit 28543be121
2 changed files with 5 additions and 9 deletions

View file

@ -1691,7 +1691,6 @@ ${escapedMessage}
texturesPromise,
PlayerAnimationDirections.Down,
false,
this.userInputManager,
this.companion,
this.companion !== null ? lazyLoadCompanionResource(this.load, this.companion) : undefined
);
@ -1811,7 +1810,7 @@ ${escapedMessage}
update(time: number, delta: number): void {
this.dirty = false;
this.currentTick = time;
this.CurrentPlayer.moveUser(delta);
this.CurrentPlayer.moveUser(delta, this.userInputManager.getEventListForGameTick());
// Let's handle all events
while (this.pendingEvents.length !== 0) {