rts-sim-module/entities/switch_entity.go

14 lines
346 B
Go
Raw Normal View History

2023-09-13 10:05:42 +08:00
package entities
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/system"
)
// 双机zdj9
func CreateSwitch2jzdj9Entity(w ecs.World, switchId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Switch2jZdj9StateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: switchId})
return e
}