2023-09-27 10:08:22 +08:00
|
|
|
package entities
|
2023-09-27 13:17:58 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/ecs"
|
2023-10-09 11:17:25 +08:00
|
|
|
"joylink.club/rtsssimulation/deprecated/system"
|
2023-09-27 13:17:58 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// CreateSpksCircuitEntity 创建人员防护按钮电路实体
|
|
|
|
func CreateSpksCircuitEntity(w ecs.World, spksCircuitId string) *ecs.Entry {
|
|
|
|
e := w.Create(system.EntityIdentityComponent, system.SpksCircuitStateComponent)
|
|
|
|
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: spksCircuitId})
|
|
|
|
system.SpksCircuitStateComponent.Set(e, system.NewSpksCircuitState())
|
|
|
|
return e
|
|
|
|
}
|