grep
This commit is contained in:
parent
bd3ffdc123
commit
3c5199d710
@ -1,23 +0,0 @@
|
||||
const Phaser = require('phaser');
|
||||
|
||||
const ROW_WIDTH = 400;
|
||||
const ROW_HEIGHT = 200;
|
||||
const ROW_FILL = 0x888888;
|
||||
|
||||
const TOP_MARGIN = 50;
|
||||
const ROW_MARGIN = 50;
|
||||
const TEXT_MARGIN = 24;
|
||||
|
||||
|
||||
class CrypInfo extends Phaser.GameObjects.Rectangle {
|
||||
constructor(scene, cryp, i) {
|
||||
const X_ORIGIN = 0;
|
||||
const Y_ORIGIN = (i * ROW_HEIGHT + ROW_MARGIN) + TOP_MARGIN;
|
||||
super(scene, X_ORIGIN, Y_ORIGIN, ROW_WIDTH, ROW_HEIGHT, ROW_FILL * Math.random());
|
||||
this.setOrigin(0);
|
||||
this.cryp = cryp;
|
||||
scene.add.text(X_ORIGIN, Y_ORIGIN + (TEXT_MARGIN * 0), cryp.name, { fontFamily: 'Arial', fontSize: 24, color: '#ffffff', fontStyle: 'bold' });
|
||||
scene.add.text(X_ORIGIN, Y_ORIGIN + (TEXT_MARGIN * 1), cryp.stamina.base, { fontFamily: 'Arial', fontSize: 24, color: '#ffffff', fontStyle: 'bold' })
|
||||
}
|
||||
}
|
||||
module.exports = CrypInfo;
|
||||
Loading…
x
Reference in New Issue
Block a user