players on join
This commit is contained in:
@@ -160,7 +160,7 @@ class ItemList extends Phaser.Scene {
|
||||
.rectangle(WIDTH * 0.01, Y + HEIGHT * 0.775, ITEM_WIDTH * 1.25, ITEM_HEIGHT * 1.25, 0x222222)
|
||||
.setInteractive()
|
||||
.setOrigin(0)
|
||||
.on('pointerdown', () => this.registry.get('ws').sendVboxDiscard(vbox.game));
|
||||
.on('pointerdown', () => this.registry.get('ws').sendVboxDiscard(vbox.instance));
|
||||
this.add.text(reroll.getCenter().x, reroll.getCenter().y, 'Reroll', TEXT.HEADER)
|
||||
.setOrigin(0.5, 0.5);
|
||||
|
||||
@@ -169,7 +169,7 @@ class ItemList extends Phaser.Scene {
|
||||
.setInteractive()
|
||||
.setOrigin(0)
|
||||
.on('pointerdown', () => {
|
||||
ws.sendVboxCombine(vbox.game, this.combinerItems);
|
||||
ws.sendVboxCombine(vbox.instance, this.combinerItems);
|
||||
this.combinerItems = [-1, -1, -1];
|
||||
this.children.list.filter(obj => obj instanceof CombinerHitBox).forEach(cBox => cBox.deallocate());
|
||||
});
|
||||
@@ -201,7 +201,7 @@ class ItemList extends Phaser.Scene {
|
||||
itemBox
|
||||
.setInteractive()
|
||||
.on('pointerdown', () => {
|
||||
ws.sendVboxAccept(vbox.game, i);
|
||||
ws.sendVboxAccept(vbox.instance, i);
|
||||
});
|
||||
this.add.existing(itemBox);
|
||||
});
|
||||
@@ -277,8 +277,8 @@ class ItemList extends Phaser.Scene {
|
||||
return true;
|
||||
}
|
||||
// Allocate to cryp hitbox
|
||||
if (hitBox instanceof DeleteHitBox) ws.sendVboxDrop(vbox.game, item.index);
|
||||
else ws.sendVboxApply(vbox.game, hitBox.cryp.id, item.index);
|
||||
if (hitBox instanceof DeleteHitBox) ws.sendVboxDrop(vbox.instance, item.index);
|
||||
else ws.sendVboxApply(vbox.instance, hitBox.cryp.id, item.index);
|
||||
}
|
||||
// If the item hasn't been allocated deallocate the item
|
||||
// Scene will restart if there is vbox change
|
||||
|
||||
@@ -38,7 +38,7 @@ class Menu extends Phaser.Scene {
|
||||
|
||||
// When we load the menu request the latest items
|
||||
// Item list will restart when the data comes in
|
||||
this.registry.get('ws').sendVboxState(NULL_UUID);
|
||||
this.registry.get('ws').sendPlayerState(NULL_UUID);
|
||||
|
||||
this.scene.manager.add('MenuCrypList', MenuCrypList, true);
|
||||
this.scene.manager.add('MenuNavigation', MenuNavigation, true);
|
||||
|
||||
Reference in New Issue
Block a user