rts-sim-module/entities/emps_entity.go
2023-09-27 13:17:58 +08:00

14 lines
411 B
Go

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
}