修改创建Entity问题
This commit is contained in:
parent
719def7aa6
commit
c0c86d0d4c
7
world.go
7
world.go
@ -78,12 +78,7 @@ func (w *world) Id() WorldId {
|
||||
}
|
||||
|
||||
func (w *world) Create(components ...donburi.IComponentType) Entity {
|
||||
len := len(components)
|
||||
var icts []donburi.IComponentType = make([]donburi.IComponentType, len)
|
||||
for i := 0; i < len; i++ {
|
||||
icts[i] = components[i].(ComponentType[any]).ComponentType
|
||||
}
|
||||
entity := w.world.Create(icts...)
|
||||
entity := w.world.Create(components...)
|
||||
return Entity{entity}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user