added bound
This commit is contained in:
parent
2c2e1dddbe
commit
99cc144361
@ -13,9 +13,10 @@ class Vbox extends Phaser.Scene {
|
||||
|
||||
create(vbox) {
|
||||
this.cameras.main.setViewport(X, Y, WIDTH, HEIGHT);
|
||||
this.add.text(WIDTH / 10, 0, 'VariBox', TEXT.HEADER)
|
||||
this.add.text(WIDTH / 10, 0, 'free', TEXT.HEADER);
|
||||
this.add.text(WIDTH / 5, 0, 'bound', TEXT.HEADER);
|
||||
|
||||
const drawItem = (item, i) => {
|
||||
const drawFree = (item, i) => {
|
||||
this.add
|
||||
.text(WIDTH / 10, 25 * (i + 2), item, TEXT.NORMAL)
|
||||
.setInteractive()
|
||||
@ -23,9 +24,19 @@ class Vbox extends Phaser.Scene {
|
||||
this.registry.get('ws').sendVboxAccept(vbox.game, i);
|
||||
console.log(item);
|
||||
});
|
||||
;
|
||||
};
|
||||
vbox.free.forEach(drawItem);
|
||||
|
||||
const drawBound = (item, i) => {
|
||||
this.add
|
||||
.text(WIDTH / 5, 25 * (i + 2), item, TEXT.NORMAL)
|
||||
.setInteractive()
|
||||
.on('pointerdown', () => {
|
||||
// this.registry.get('ws').sendVboxAccept(vbox.game, i);
|
||||
console.log(item);
|
||||
});
|
||||
};
|
||||
vbox.free.forEach(drawFree);
|
||||
vbox.bound.forEach(drawBound);
|
||||
}
|
||||
|
||||
cleanUp() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user