spks emps
This commit is contained in:
parent
11a572e9c7
commit
9d4c0cf164
13
entities/emps_entity.go
Normal file
13
entities/emps_entity.go
Normal file
@ -0,0 +1,13 @@
|
||||
package entities
|
||||
|
||||
import (
|
||||
"joylink.club/ecs"
|
||||
"joylink.club/rtsssimulation/system"
|
||||
)
|
||||
|
||||
func CreateEmpsCircuitEntity(w ecs.World, empsCircuitId string) *ecs.Entry {
|
||||
e := w.Create(system.EntityIdentityComponent, system.EmpsCircuitStateComponent)
|
||||
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: empsCircuitId})
|
||||
system.EmpsCircuitStateComponent.Set(e, system.NewEmpsCircuitState())
|
||||
return e
|
||||
}
|
@ -1 +1,14 @@
|
||||
package entities
|
||||
|
||||
import (
|
||||
"joylink.club/ecs"
|
||||
"joylink.club/rtsssimulation/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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user