fixt button and other misc shit
This commit is contained in:
parent
56e4c22e05
commit
b83c824795
@ -26,7 +26,7 @@ const menuNavigationY = () => Math.floor(CANVAS_HEIGHT() * 0.7);
|
|||||||
|
|
||||||
const menuMainWidth = () => Math.floor(CANVAS_WIDTH() * 0.4);
|
const menuMainWidth = () => Math.floor(CANVAS_WIDTH() * 0.4);
|
||||||
const menuMainHeight = () => Math.floor(CANVAS_HEIGHT() * 0.5);
|
const menuMainHeight = () => Math.floor(CANVAS_HEIGHT() * 0.5);
|
||||||
const menuMainX = () => Math.floor(CANVAS_WIDTH() * 0.6);
|
const menuMainX = () => Math.floor(CANVAS_WIDTH() * 0.65);
|
||||||
const menuMainY = () => headerHeight();
|
const menuMainY = () => headerHeight();
|
||||||
|
|
||||||
const homeMainWidth = () => Math.floor(CANVAS_WIDTH() * 0.6);
|
const homeMainWidth = () => Math.floor(CANVAS_WIDTH() * 0.6);
|
||||||
|
|||||||
@ -5,10 +5,10 @@ const { TEXT, COLOURS, POSITIONS: { CRYP_LIST } } = require('./constants');
|
|||||||
const genAvatar = require('./avatar');
|
const genAvatar = require('./avatar');
|
||||||
const { LineGroup, LineBox } = require('./elements/outline.rotate');
|
const { LineGroup, LineBox } = require('./elements/outline.rotate');
|
||||||
|
|
||||||
const ROW_HEIGHT = CRYP_LIST.height() * 0.2;
|
const ROW_HEIGHT = CRYP_LIST.height() * 0.1;
|
||||||
const ROW_WIDTH = CRYP_LIST.width();
|
const ROW_WIDTH = CRYP_LIST.width();
|
||||||
|
|
||||||
const menuY = CRYP_LIST.height() * 1.6;
|
const menuY = CRYP_LIST.height() * 0.8;
|
||||||
|
|
||||||
const KEY_MAP = [
|
const KEY_MAP = [
|
||||||
'keydown-ONE',
|
'keydown-ONE',
|
||||||
|
|||||||
@ -44,8 +44,10 @@ class StatSheet extends Phaser.Scene {
|
|||||||
|
|
||||||
|
|
||||||
updateData(parent, key, data) {
|
updateData(parent, key, data) {
|
||||||
if (key === 'cryps') {
|
if (key === 'player') {
|
||||||
const cryp = data.find(c => c.id === this.cryp.id);
|
console.log('grep');
|
||||||
|
console.log(data);
|
||||||
|
const cryp = data.cryps.find(c => c.id === this.cryp.id);
|
||||||
this.scene.restart(cryp);
|
this.scene.restart(cryp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,7 +85,6 @@ class StatSheet extends Phaser.Scene {
|
|||||||
];
|
];
|
||||||
|
|
||||||
CRYP_STATS.forEach(crypStat);
|
CRYP_STATS.forEach(crypStat);
|
||||||
this.add.text(X + WIDTH * 0.175, Y, 'Skills', TEXT.HEADER);
|
|
||||||
const knownSkill = (skill, i) => {
|
const knownSkill = (skill, i) => {
|
||||||
const SKILL_X = X + WIDTH * 0.4 + WIDTH * 0.125 * i;
|
const SKILL_X = X + WIDTH * 0.4 + WIDTH * 0.125 * i;
|
||||||
const SKILL_Y = Y + HEIGHT * 0.15;
|
const SKILL_Y = Y + HEIGHT * 0.15;
|
||||||
@ -126,6 +127,7 @@ class StatSheet extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
displaySkillText(x, y, description, pointer) {
|
displaySkillText(x, y, description, pointer) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user