Skip to content

Commit

Permalink
InGameScene: Load ClientPlayer before map
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGrieb committed Nov 17, 2023
1 parent 65a2d36 commit 14b2fa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/player/ClientPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ClientPlayer extends AbstractPlayer {
this.hoveredTile = new HoveredTile(9999, 9999);
this.hoveredTile.loadImage().then(() => {
Game.getCurrentScene().addActor(this.hoveredTile);

console.log("update hovered tile.");
this.updateHoveredTile(Game.getMouseX(), Game.getMouseY());
});
});
Expand Down
3 changes: 2 additions & 1 deletion client/src/scene/type/InGameScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class InGameScene extends Scene {
private closeCityDisplayButton: Button;

public onInitialize(): void {
GameMap.init();
this.players = [];
if (this.firstLoad) {
const camera = new Camera({
Expand Down Expand Up @@ -56,6 +55,8 @@ export class InGameScene extends Scene {
},
});

GameMap.init();

this.on("mapLoaded", () => {
this.tileInformationLabel = new Label({
text: "N/A",
Expand Down

0 comments on commit 14b2fa0

Please sign in to comment.