Add: HeartManager, HeartGauge

This commit is contained in:
2018-05-15 09:07:17 +09:00
parent b89490facd
commit 407f95f26f
9 changed files with 240 additions and 34 deletions
+22
View File
@@ -0,0 +1,22 @@
class HeartGauge {
constructor(heartManager) {
this.heartManager = heartManager;
this.heartManager.addOnChangeHeartListener(
() => {
console.log(this.heartManager.getHearts());
}
);
};
}
HeartGauge.DEFAULT_TEXT_FONT = {
font: "30px Arial",
boundsAlignH: "center", // left, center. right
boundsAlignV: "middle", // top, middle, bottom
fill: "#fff"
};
HeartGauge.MOVE_UP_AMOUNT_PX = 50;