Merge branch 'combos' of ssh://cryps.gg:40022/~/cryps into combos

This commit is contained in:
ntr 2019-02-18 14:09:31 +11:00
commit 6f035d9839

View File

@ -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() {