Placeholder scene for holding specs

This commit is contained in:
Mashy
2019-01-16 16:43:43 +10:00
parent 2a82404a48
commit 31f48c0663
3 changed files with 154 additions and 3 deletions
+3 -2
View File
@@ -10,7 +10,7 @@ const TEXT_MARGIN = 24;
const menuX = WIDTH / 10;
const menuY = HEIGHT * 0.8;
const menuWidth = WIDTH / 10;
const menuHeight = HEIGHT * 0.3;
const menuHeight = HEIGHT * 0.2;
const X_LEARN = WIDTH * 2 / 4;
const Y_SKILLS = HEIGHT * 0.5;
@@ -23,7 +23,7 @@ function addButton(scene, x, y, cback, name) {
.setOrigin(0)
.on('pointerdown', cback);
scene.add.text(button.getCenter().x, button.getCenter().y, name, TEXT.HEADER)
.setOrigin(0.5, 1);
.setOrigin(0.5, 0.5);
}
class StatSheet extends Phaser.Scene {
@@ -41,6 +41,7 @@ class StatSheet extends Phaser.Scene {
this.addStats(cryp);
this.addKnownSkills(cryp);
this.addLearnableSkills(cryp);
addButton(this, menuX, menuY, () => this.registry.set('crypSpec', cryp), 'Spec');
}
updateData(parent, key, data) {