修改断相保护器实体创建bug

This commit is contained in:
walker 2023-10-07 17:03:34 +08:00
parent 9faf98f1eb
commit a60a390708

View File

@ -9,7 +9,7 @@ import (
func NewDBQEntity(w ecs.World, uid string, entityMap map[string]*ecs.Entry) *ecs.Entry { func NewDBQEntity(w ecs.World, uid string, entityMap map[string]*ecs.Entry) *ecs.Entry {
entry, ok := entityMap[uid] entry, ok := entityMap[uid]
if !ok { if !ok {
entry = w.Create(component.DBQTag, component.DBQStateType, component.CounterType) entry = w.Create(component.DBQTag, component.UidType, component.DBQStateType, component.CounterType)
component.UidType.SetValue(entry, component.Uid{Id: uid}) component.UidType.SetValue(entry, component.Uid{Id: uid})
entityMap[uid] = entry entityMap[uid] = entry
} }