Files
ueblueprint/js/entity/IntegerEntity.js
2021-12-06 22:07:51 +01:00

26 lines
450 B
JavaScript
Executable File

import Entity from "./Entity"
export default class IntegerEntity extends Entity {
static attributes = {
value: Number
}
getAttributes() {
return IntegerEntity.attributes
}
constructor(options = {}) {
super(options)
this.value = Math.round(this.value)
}
valueOf() {
return this.value
}
toString() {
return this.value.toString()
}
}