donsol-js/sources/scripts/gage.health.js
2020-04-16 19:53:23 +09:00

15 lines
423 B
JavaScript

'use strict'
function Gage_Health (name, limit, color) {
Gage.call(this, name, limit, color)
this.update = function () {
this.progress.update(this.value, this.limit)
if (donsol.player.can_drink === false) {
this.value_element.innerHTML = `<span>${this.value}</span> <span class='unit'>HP</span>`
} else {
this.value_element.innerHTML = `${this.value} <span class='unit'>HP</span>`
}
}
}