修改创建Entity问题

This commit is contained in:
walker 2023-08-04 13:19:59 +08:00
parent 719def7aa6
commit c0c86d0d4c

View File

@ -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}
}