双机zdj9道岔测试
This commit is contained in:
parent
32a46687f4
commit
529017d54b
@ -8,14 +8,14 @@ import (
|
|||||||
"joylink.club/rtsssimulation/umi"
|
"joylink.club/rtsssimulation/umi"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 创建模型仓库实体
|
// CreateModelStorageEntity 创建模型仓库实体
|
||||||
func CreateModelStorageEntity(w ecs.World, modelManager umi.IModelManager) *ecs.Entry {
|
func CreateModelStorageEntity(w ecs.World, modelManager umi.IModelManager) *ecs.Entry {
|
||||||
e := w.Create(system.ModelStorageComponent)
|
e := w.Create(system.ModelStorageComponent)
|
||||||
system.ModelStorageComponent.Set(e, &system.ModelStorageRef{ModelManager: modelManager})
|
system.ModelStorageComponent.Set(e, &system.ModelStorageRef{ModelManager: modelManager})
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建系统时钟实体
|
// CreateSystemTimerEntity 创建系统时钟实体
|
||||||
func CreateSystemTimerEntity(w ecs.World, systemTime time.Time) *ecs.Entry {
|
func CreateSystemTimerEntity(w ecs.World, systemTime time.Time) *ecs.Entry {
|
||||||
e := w.Create(system.SystemTimerComponent)
|
e := w.Create(system.SystemTimerComponent)
|
||||||
system.SystemTimerComponent.Set(e, system.NewSystemTimer(&systemTime))
|
system.SystemTimerComponent.Set(e, system.NewSystemTimer(&systemTime))
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"joylink.club/rtsssimulation/system"
|
"joylink.club/rtsssimulation/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 创建继电器实体
|
// CreateRelayEntity 创建继电器实体
|
||||||
func CreateRelayEntity(w ecs.World, relayId string) *ecs.Entry {
|
func CreateRelayEntity(w ecs.World, relayId string) *ecs.Entry {
|
||||||
e := w.Create(system.EntityIdentityComponent, system.RelayStateComponent)
|
e := w.Create(system.EntityIdentityComponent, system.RelayStateComponent)
|
||||||
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: relayId})
|
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: relayId})
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"joylink.club/rtsssimulation/system"
|
"joylink.club/rtsssimulation/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 双机zdj9
|
// CreateSwitch2jzdj9Entity 双机zdj9
|
||||||
// 默认定位
|
// 默认定位
|
||||||
func CreateSwitch2jzdj9Entity(w ecs.World, switchId string) *ecs.Entry {
|
func CreateSwitch2jzdj9Entity(w ecs.World, switchId string) *ecs.Entry {
|
||||||
e := w.Create(system.EntityIdentityComponent, system.Switch2jZdj9StateComponent, system.MovableObject1Component, system.MovableObject2Component)
|
e := w.Create(system.EntityIdentityComponent, system.Switch2jZdj9StateComponent, system.MovableObject1Component, system.MovableObject2Component)
|
||||||
|
Loading…
Reference in New Issue
Block a user