sql stuff
This commit is contained in:
@@ -22,26 +22,34 @@ class GameList extends Phaser.GameObjects.Group {
|
||||
const WIDTH = GAME_LIST.width();
|
||||
const HEIGHT = GAME_LIST.height();
|
||||
|
||||
console.log(GAME_LIST.y(0))
|
||||
|
||||
const pvp = list.add
|
||||
.rectangle(X, GAME_LIST.y(0), WIDTH, HEIGHT, 0x440000)
|
||||
.setInteractive()
|
||||
.setOrigin(0);
|
||||
|
||||
this
|
||||
.add(list.add.text(pvp.getCenter().x, pvp.getCenter().y, 'PVP', TEXT.HEADER));
|
||||
.add(list.add.text(pvp.getCenter().x, pvp.getCenter().y, 'NEW', TEXT.HEADER));
|
||||
|
||||
const pve = list.add
|
||||
.rectangle(X, GAME_LIST.y(1), WIDTH, HEIGHT, 0x004400)
|
||||
.rectangle(X, GAME_LIST.y(1), Math.floor(WIDTH / 2), HEIGHT, 0x004400)
|
||||
.setInteractive()
|
||||
.setOrigin(0);
|
||||
|
||||
this
|
||||
.add(list.add.text(pve.getCenter().x, pve.getCenter().y, 'PVE', TEXT.HEADER));
|
||||
|
||||
const refresh = list.add
|
||||
.rectangle(X + Math.floor(WIDTH / 2), GAME_LIST.y(1), Math.floor(WIDTH / 2), HEIGHT, 0x000044)
|
||||
.setInteractive()
|
||||
.setOrigin(0);
|
||||
|
||||
this
|
||||
.add(list.add.text(refresh.getCenter().x, refresh.getCenter().y, 'REFRESH', TEXT.HEADER));
|
||||
|
||||
|
||||
pvp.on('pointerdown', () => {
|
||||
const team = cryps.filter(c => c.active).map(c => c.id);
|
||||
list.scene.switch('Combat');
|
||||
return ws.sendGamePvp(team);
|
||||
});
|
||||
|
||||
@@ -51,8 +59,10 @@ class GameList extends Phaser.GameObjects.Group {
|
||||
return ws.sendGamePve(team);
|
||||
});
|
||||
|
||||
this.add(pve);
|
||||
this.add(pvp);
|
||||
refresh.on('pointerdown', () => {
|
||||
return ws.sendGameJoinableList();
|
||||
});
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user