mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-13 23:37:30 +08:00
Attributes initialization refactoring (#19)
This commit is contained in:
@@ -1,19 +1,24 @@
|
||||
import AttributeInfo from "../../js/entity/AttributeInfo.js"
|
||||
import IEntity from "../../js/entity/IEntity.js"
|
||||
import Entity1 from "./Entity1.js"
|
||||
import Entity3 from "./Entity3.js"
|
||||
import IEntity from "../../js/entity/IEntity.js"
|
||||
|
||||
export default class Entity4 extends IEntity {
|
||||
|
||||
static attributes = {
|
||||
first: {
|
||||
first: new AttributeInfo({
|
||||
type: Entity3,
|
||||
default: new Entity3(),
|
||||
inlined: true,
|
||||
},
|
||||
second: {
|
||||
}),
|
||||
second: new AttributeInfo({
|
||||
default: [new Entity1({ a: 1, b: 2 }), new Entity1({ a: 11, b: 22 })],
|
||||
inlined: true,
|
||||
},
|
||||
}),
|
||||
third: new AttributeInfo({
|
||||
type: Array,
|
||||
default: null,
|
||||
})
|
||||
}
|
||||
|
||||
constructor() {
|
||||
@@ -25,8 +30,4 @@ export default class Entity4 extends IEntity {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
static {
|
||||
this.cleanupAttributes(this.attributes)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user