rts-sim-module/deprecated/entities/emps_entity.go

14 lines
422 B
Go
Raw Normal View History

2023-09-27 13:17:58 +08:00
package entities
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/deprecated/system"
2023-09-27 13:17:58 +08:00
)
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
}