Skip to content

Commit

Permalink
Now adding ghost message
Browse files Browse the repository at this point in the history
  • Loading branch information
insulationman committed Sep 1, 2023
1 parent e293518 commit c58a9be
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Scenes/Game/OrustScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export default class OrustScene extends Phaser.Scene {

create() {
this.player = new Player(this, 300, 500);
this.ghost = new Ghost(this, 300, 500, "wispspritesheet");
this.initMap();
this.initGhost();

Expand Down Expand Up @@ -171,9 +170,8 @@ export default class OrustScene extends Phaser.Scene {

this.websocket.onmessage = (event) => {
if (this.ghost === undefined) {
this.ghost = this.add.sprite(0, 0, "playerspritesheet", 0);
this.ghost = new Ghost(this, 300, 500, "wispspritesheet");
this.ghost.setDepth(100);
this.ghost.setTint(0x555555);
}
const data = JSON.parse(event.data);
if (data.type === "player") {
Expand Down

0 comments on commit c58a9be

Please sign in to comment.