17 lines
353 B
Go
17 lines
353 B
Go
package entity
|
|
|
|
import (
|
|
"joylink.club/ecs"
|
|
"joylink.club/rtsssimulation/component"
|
|
)
|
|
|
|
// 创建断相保护器实体
|
|
func NewDBQEntity(w ecs.World, uid string, entityMap map[string]*ecs.Entry) *ecs.Entry {
|
|
entry, ok := entityMap[uid]
|
|
if !ok {
|
|
entry = w.Create(component.DBQTag, component.DBQStateType)
|
|
entityMap[uid] = entry
|
|
}
|
|
return entry
|
|
}
|