Cleanup: renaming "frame" to "character"
The "frame" variable actually contains a string pointing to the character selected. It has nothing to do with a frame which is usually a particular image in an animation. I'm renaming the variable accross the application to avoid confusion.
This commit is contained in:
parent
ddbd4f4c06
commit
492196b333
9 changed files with 47 additions and 47 deletions
|
@ -83,12 +83,12 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
|
|||
}
|
||||
if (x !== 0 || y !== 0) {
|
||||
this.move(x, y);
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, frame: this.PlayerTexture});
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, character: this.PlayerTexture});
|
||||
} else {
|
||||
if (this.previousMove !== PlayerAnimationNames.None) {
|
||||
direction = PlayerAnimationNames.None;
|
||||
this.stop();
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, frame: this.PlayerTexture});
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, character: this.PlayerTexture});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue