mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-12 22:47:30 +08:00
Attributes initialization refactoring (#19)
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import Grammar from "../../js/serialization/Grammar.js"
|
||||
import AttributeInfo from "../../js/entity/AttributeInfo.js"
|
||||
import IEntity from "../../js/entity/IEntity.js"
|
||||
import Union from "../../js/entity/Union.js"
|
||||
import Grammar from "../../js/serialization/Grammar.js"
|
||||
|
||||
export default class EntityF extends IEntity {
|
||||
|
||||
static lookbehind = new Union("Foo", "Bar")
|
||||
static attributes = {
|
||||
...super.attributes,
|
||||
arg1: {
|
||||
type: Number,
|
||||
},
|
||||
arg2: {
|
||||
type: String,
|
||||
},
|
||||
arg1: AttributeInfo.createType(Number),
|
||||
arg2: AttributeInfo.createType(String),
|
||||
lookbehind: new AttributeInfo({
|
||||
...super.attributes.lookbehind,
|
||||
default: new Union("Foo", "Bar"),
|
||||
})
|
||||
}
|
||||
|
||||
static grammar = this.createGrammar()
|
||||
|
||||
Reference in New Issue
Block a user