15 lines
486 B
Go
15 lines
486 B
Go
package entities
|
|
|
|
import (
|
|
"joylink.club/ecs"
|
|
"joylink.club/rtsssimulation/deprecated/system"
|
|
)
|
|
|
|
// 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
|
|
}
|