Merge branch 'master' of https://git.code.tencent.com/jl-framework/rtss_simulation
This commit is contained in:
commit
5833de36fb
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