Displaying the name of a player above its head (names are not passed through the network yet)
This commit is contained in:
parent
42ddd8b858
commit
0c04d4305b
4 changed files with 24 additions and 11 deletions
|
@ -63,6 +63,8 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
'resources/characters/pipoya/Male 01-1.png',
|
||||
{ frameWidth: 32, frameHeight: 32 }
|
||||
);
|
||||
this.load.bitmapFont('main_font', 'resources/fonts/arcade.png', 'resources/fonts/arcade.xml');
|
||||
|
||||
cypressAsserter.preloadFinished();
|
||||
}
|
||||
|
||||
|
@ -166,6 +168,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
this,
|
||||
this.startX,
|
||||
this.startY,
|
||||
this.playerName
|
||||
);
|
||||
this.CurrentPlayer.initAnimation();
|
||||
|
||||
|
@ -253,6 +256,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
this,
|
||||
MessageUserPosition.position.x,
|
||||
MessageUserPosition.position.y,
|
||||
'Foo'
|
||||
);
|
||||
player.initAnimation();
|
||||
this.MapPlayers.add(player);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue