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