rts-sim-module/entity/dbq.go
walker d3a187e00f 添加创建仿真
完善仿真实体加载
2023-09-28 14:34:00 +08:00

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
}