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:
David Négrier 2020-05-08 15:18:22 +02:00
parent ddbd4f4c06
commit 492196b333
9 changed files with 47 additions and 47 deletions

View file

@ -167,7 +167,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
this.startX,
this.startY,
this.GameManager.getPlayerName(),
this.GameManager.getFrameSelected()
this.GameManager.getCharacterSelected()
);
this.CurrentPlayer.initAnimation();
@ -261,15 +261,15 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
MessageUserPosition.position.x,
MessageUserPosition.position.y,
MessageUserPosition.name,
MessageUserPosition.frame
MessageUserPosition.character
);
player.initAnimation();
this.MapPlayers.add(player);
player.updatePosition(MessageUserPosition);
//init colision
this.physics.add.collider(this.CurrentPlayer, player, (CurrentPlayer: CurrentGamerInterface, MapPlayer: GamerInterface) => {
//init collision
/*this.physics.add.collider(this.CurrentPlayer, player, (CurrentPlayer: CurrentGamerInterface, MapPlayer: GamerInterface) => {
CurrentPlayer.say("Hello, how are you ? ");
});
});*/
}
}