press r
This commit is contained in:
@@ -12,7 +12,7 @@ const Y = ITEM_LIST.y();
|
||||
const WIDTH = ITEM_LIST.width();
|
||||
const HEIGHT = ITEM_LIST.height();
|
||||
const ITEM_WIDTH = WIDTH * 0.4;
|
||||
const ITEM_HEIGHT = HEIGHT * 0.08;
|
||||
const ITEM_HEIGHT = HEIGHT * 0.06;
|
||||
|
||||
const itemCheckHitbox = (scenePlugin, pointer) => {
|
||||
const { list } = scenePlugin.get('MenuCrypList').children;
|
||||
@@ -47,7 +47,7 @@ class Item extends Phaser.GameObjects.Container {
|
||||
.rectangle(0, 0, ITEM_WIDTH, ITEM_HEIGHT, 0x222222);
|
||||
|
||||
this.text = scene.add
|
||||
.text(0, 0, `${action} x${count}`, TEXT.HEADER)
|
||||
.text(0, 0, `${action} x${count}`, TEXT.NORMAL)
|
||||
.setOrigin(0.5, 0.5);
|
||||
|
||||
this.add(this.box);
|
||||
@@ -91,6 +91,8 @@ class ItemList extends Phaser.Scene {
|
||||
|
||||
updateData(parent, key) {
|
||||
if (key === 'itemList') {
|
||||
this.registry.events.off('changedata', this.updateData, this);
|
||||
this.registry.events.off('setdata', this.updateData, this);
|
||||
this.scene.restart();
|
||||
}
|
||||
}
|
||||
@@ -110,8 +112,6 @@ class ItemList extends Phaser.Scene {
|
||||
|
||||
const actions = countBy(itemList, i => i.action);
|
||||
|
||||
console.log(actions);
|
||||
|
||||
Object.keys(actions).forEach((action, i) => {
|
||||
const ITEM_X = ITEM_WIDTH;
|
||||
const ITEM_Y = ITEM_HEIGHT * 1.2 * i + HEIGHT / 2.5;
|
||||
|
||||
@@ -84,6 +84,11 @@ function createSocket(events) {
|
||||
send({ method: 'game_joinable_list', params: { } });
|
||||
}
|
||||
|
||||
function sendPressR() {
|
||||
send({ method: 'press_r', params: { } });
|
||||
}
|
||||
|
||||
window.pressR = sendPressR;
|
||||
|
||||
function sendGameSkill(gameId, crypId, targetCrypId, skill) {
|
||||
send({
|
||||
|
||||
Reference in New Issue
Block a user