Get playerlist on home page
This commit is contained in:
parent
dafbf145f8
commit
750a81c29f
@ -28,7 +28,6 @@ class HomeRankings extends Phaser.Scene {
|
|||||||
};
|
};
|
||||||
|
|
||||||
playerList.forEach(addInstance);
|
playerList.forEach(addInstance);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUp() {
|
cleanUp() {
|
||||||
|
|||||||
@ -26,6 +26,8 @@ class Home extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
|
this.registry.get('ws').sendAccountPlayers();
|
||||||
|
|
||||||
this.registry.events.on('changedata', this.updateData, this);
|
this.registry.events.on('changedata', this.updateData, this);
|
||||||
this.registry.events.on('setdata', this.updateData, this);
|
this.registry.events.on('setdata', this.updateData, this);
|
||||||
this.scene.manager.add('HomeCryps', HomeCryps, true);
|
this.scene.manager.add('HomeCryps', HomeCryps, true);
|
||||||
|
|||||||
@ -28,7 +28,6 @@ class MenuNavigation extends Phaser.Scene {
|
|||||||
.text(ready.getCenter().x, ready.getCenter().y, 'Ready', TEXT.HEADER)
|
.text(ready.getCenter().x, ready.getCenter().y, 'Ready', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
ready.on('pointerdown', () => {
|
ready.on('pointerdown', () => {
|
||||||
console.log(player);
|
|
||||||
ws.sendInstanceReady(player.instance);
|
ws.sendInstanceReady(player.instance);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -157,7 +157,6 @@ function createSocket(events) {
|
|||||||
account = login;
|
account = login;
|
||||||
events.setAccount(login);
|
events.setAccount(login);
|
||||||
sendAccountCryps();
|
sendAccountCryps();
|
||||||
sendAccountPlayers();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function accountPlayerList(res) {
|
function accountPlayerList(res) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user