15 lines
459 B
Go
15 lines
459 B
Go
package entities
|
|
|
|
import (
|
|
"joylink.club/ecs"
|
|
"joylink.club/rtsssimulation/system"
|
|
)
|
|
|
|
// CreateDcbCircuitEntity 创建门控箱电路实体
|
|
func CreateDcbCircuitEntity(w ecs.World, dcbCircuitId string) *ecs.Entry {
|
|
e := w.Create(system.EntityIdentityComponent, system.DcbCircuitStateComponent)
|
|
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: dcbCircuitId})
|
|
system.DcbCircuitStateComponent.Set(e, system.NewDcbCircuitState())
|
|
return e
|
|
}
|