mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-12 02:57:32 +08:00
Various fixes
This commit is contained in:
22
js/entity/CalculatedType.js
Normal file
22
js/entity/CalculatedType.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @typedef {import("./IEntity").default} IEntity
|
||||
*/
|
||||
|
||||
export default class CalculatedType {
|
||||
|
||||
#f
|
||||
|
||||
/**
|
||||
* @param {Function} f
|
||||
*/
|
||||
constructor(f) {
|
||||
this.#f = f
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {IEntity} entity
|
||||
*/
|
||||
calculate(entity) {
|
||||
return this.f(entity)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user