Added skill descriptions, cleaned up some scenes
This commit is contained in:
@@ -54,17 +54,19 @@ class StatSheet extends Phaser.Scene {
|
||||
|
||||
create(cryp) {
|
||||
this.registry.events.on('changedata', this.updateData, this);
|
||||
const ws = this.registry.get('ws');
|
||||
// const ws = this.registry.get('ws');
|
||||
|
||||
const player = this.registry.get('player');
|
||||
if (!player) return false;
|
||||
const { vbox } = player;
|
||||
// const { vbox } = player;
|
||||
|
||||
this.cryp = cryp;
|
||||
|
||||
/*
|
||||
const del = this.add.existing(new DeleteHitBox(this, X + WIDTH * 0.7, Y + HEIGHT * 0.6));
|
||||
this.add.text(del.getCenter().x, del.getCenter().y, 'unequip', TEXT.HEADER)
|
||||
.setOrigin(0.5, 0.5);
|
||||
*/
|
||||
|
||||
this.add.text(X, Y, cryp.name, TEXT.HEADER);
|
||||
|
||||
@@ -85,6 +87,7 @@ class StatSheet extends Phaser.Scene {
|
||||
];
|
||||
|
||||
CRYP_STATS.forEach(crypStat);
|
||||
/*
|
||||
const knownSkill = (skill, i) => {
|
||||
const SKILL_X = X + WIDTH * 0.4 + WIDTH * 0.125 * i;
|
||||
const SKILL_Y = Y + HEIGHT * 0.15;
|
||||
@@ -127,19 +130,10 @@ class StatSheet extends Phaser.Scene {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
*/
|
||||
return this;
|
||||
}
|
||||
|
||||
displaySkillText(x, y, description, pointer) {
|
||||
if (this.skillText) this.skillText.destroy();
|
||||
this.skillText = this.add.text(x, y, description, TEXT.HOVER).setPadding(32);
|
||||
this.skillText.setAlpha(0.8);
|
||||
this.skillText.setOrigin(pointer.x >= WIDTH * 0.65 ? 1 : 0,
|
||||
pointer.y >= HEIGHT * 0.25 ? 1 : 0);
|
||||
this.skillText.setWordWrapWidth(450);
|
||||
}
|
||||
|
||||
|
||||
cleanUp() {
|
||||
this.registry.events.off('changedata', this.updateData, this);
|
||||
this.scene.remove();
|
||||
|
||||
Reference in New Issue
Block a user