Added old files

This commit is contained in:
neauoire 2020-04-16 19:53:23 +09:00
commit ef3620f4f9
86 changed files with 2157 additions and 0 deletions

View file

@ -0,0 +1,25 @@
'use strict'
function Gage_Shield (name, limit, color) {
Gage.call(this, name, limit, color)
this.break_limit = null
this.update = function () {
if (this.is_damaged() === true) {
this.value_element.innerHTML = `${this.break_limit - 1}/${this.value} <span class='unit'>DP</span>`
this.progress.update(this.value < this.break_limit ? this.value : this.break_limit - 1, 11)
} else if (this.value == 0) {
this.value_element.innerHTML = "0 <span class='unit'>DP</span>"
this.progress.update(0, 11)
} else {
this.value_element.innerHTML = '<span>' + this.value + "</span> <span class='unit'>DP</span>"
this.progress.update(this.value, 11)
}
}
this.is_damaged = function () {
if (this.break_limit === null) { return false }
return true
}
}