mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-14 00:54:48 +08:00
27 lines
495 B
JavaScript
Executable File
27 lines
495 B
JavaScript
Executable File
import IEntity from "./IEntity"
|
|
|
|
export default class IntegerEntity extends IEntity {
|
|
|
|
static attributes = {
|
|
value: 0,
|
|
}
|
|
|
|
static {
|
|
this.cleanupAttributes(this.attributes)
|
|
}
|
|
|
|
/** @param {Object | Number | String} value */
|
|
constructor(value = 0) {
|
|
super(value)
|
|
this.value = Math.round(this.value)
|
|
}
|
|
|
|
valueOf() {
|
|
return this.value
|
|
}
|
|
|
|
toString() {
|
|
return this.value.toString()
|
|
}
|
|
}
|