Fixed player set
This commit is contained in:
parent
8c89bd6841
commit
8abe18b0f1
@ -66,6 +66,8 @@ function registerEvents(registry, events, tutorial) {
|
||||
registry.set('crypStatusUpdate', { id, skill, target });
|
||||
}
|
||||
|
||||
events.on('SET_PLAYER', setPlayer);
|
||||
|
||||
events.on('SEND_SKILL', function skillActive(gameId, crypId, targetCrypId, skill) {
|
||||
const ws = registry.get('ws');
|
||||
ws.sendGameSkill(gameId, crypId, targetCrypId, skill);
|
||||
|
||||
@ -104,9 +104,7 @@ class HomeCrypList extends Phaser.Scene {
|
||||
.setInteractive()
|
||||
.setOrigin(0)
|
||||
.on('pointerdown', () => {
|
||||
const playerCryps = [];
|
||||
this.activeCryps.forEach(obj => playerCryps.push(obj.cryp.id));
|
||||
ws.sendPlayerCrypsSet(player.instance, playerCryps);
|
||||
this.game.events.emit('SET_PLAYER', player);
|
||||
});
|
||||
this.add
|
||||
.text(joinNormal.getCenter().x, joinNormal.getCenter().y, `${player.instance}`, TEXT.NORMAL)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user