random floors

This commit is contained in:
ntr
2019-01-22 12:46:55 +11:00
parent 0da395d3d6
commit 29299a3100
4 changed files with 36 additions and 64 deletions
+4 -4
View File
@@ -45,10 +45,10 @@ const statsLearnableX = () => Math.floor(statsX() + statsWidth() / 2);
const statsTextMargin = () => 24;
const statsLearnableMargin = () => 12;
const logWidth = () => combatWidth() * 0.5;
const logHeight = () => combatHeight() * 0.3;
const logY = () => headerHeight() + (combatHeight() * 0.7);
const logX = () => combatWidth() * 0.2;
const logWidth = () => Math.floor(combatWidth() * 0.5);
const logHeight = () => Math.floor(combatHeight() * 0.3);
const logY = () => Math.floor(headerHeight() + (combatHeight() * 0.7));
const logX = () => Math.floor(combatWidth() * 0.2);
module.exports = {
+4 -4
View File
@@ -69,13 +69,13 @@ class StatSheet extends Phaser.Scene {
}));
};
this.specs.add(this.add.text(X_MARGIN, 0, 'Common Specs', TEXT.HEADER));
this.specs.add(this.add.text(X_MARGIN, 0, 'Common', TEXT.HEADER));
cryp.specs.common.forEach((specInfo, i) => listSpecs(1, specInfo, i));
this.specs.add(this.add.text(X_MARGIN * 2, 0, 'Uncommon Specs', TEXT.HEADER));
this.specs.add(this.add.text(X_MARGIN * 2, 0, 'Uncommon', TEXT.HEADER));
cryp.specs.uncommon.forEach((specInfo, i) => listSpecs(2, specInfo, i));
this.specs.add(this.add.text(X_MARGIN * 3, 0, 'Rare Specs', TEXT.HEADER));
this.specs.add(this.add.text(X_MARGIN * 3, 0, 'Rare', TEXT.HEADER));
cryp.specs.rare.forEach((specInfo, i) => listSpecs(3, specInfo, i));
}
@@ -84,7 +84,7 @@ class StatSheet extends Phaser.Scene {
if (this.hoverText) this.hoverText.destroy();
this.hoverText = this.add.text(x, y, description, {
fontSize: '16px',
fontFamily: 'Arial',
fontFamily: 'Jura',
color: '#ffffff',
backgroundColor: '#222222',
}).setPadding(32);
+6 -6
View File
@@ -7,13 +7,13 @@ const WIDTH = MENU_MAIN.width();
const HEIGHT = MENU_MAIN.height();
const TEXT_MARGIN = 24;
const menuX = WIDTH / 10;
const menuY = HEIGHT * 0.8;
const menuWidth = WIDTH / 10;
const menuHeight = HEIGHT * 0.2;
const menuX = Math.floor(WIDTH / 10);
const menuY = Math.floor(HEIGHT * 0.8);
const menuWidth = Math.floor(WIDTH / 10);
const menuHeight = Math.floor(HEIGHT * 0.2);
const X_LEARN = WIDTH * 2 / 4;
const Y_SKILLS = HEIGHT * 0.5;
const X_LEARN = Math.floor(WIDTH * 2 / 4);
const Y_SKILLS = Math.floor(HEIGHT * 0.5);
function addButton(scene, x, y, cback, name) {