mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-10 13:24:40 +08:00
34 lines
707 B
JavaScript
Executable File
34 lines
707 B
JavaScript
Executable File
import Utility from "../Utility.js"
|
|
import IEntity from "./IEntity.js"
|
|
|
|
export default class ObjectReferenceEntity extends IEntity {
|
|
|
|
static attributes = {
|
|
type: {
|
|
default: "",
|
|
},
|
|
path: {
|
|
default: "",
|
|
},
|
|
}
|
|
|
|
static {
|
|
this.cleanupAttributes(this.attributes)
|
|
}
|
|
|
|
constructor(values = {}) {
|
|
if (values.constructor === String) {
|
|
values = {
|
|
path: values
|
|
}
|
|
}
|
|
super(values)
|
|
/** @type {String} */ this.type
|
|
/** @type {String} */ this.path
|
|
}
|
|
|
|
getName() {
|
|
return Utility.getNameFromPath(this.path)
|
|
}
|
|
}
|