双机zdj9道岔测试

This commit is contained in:
xzb 2023-09-15 13:50:15 +08:00
parent 32a46687f4
commit 529017d54b
3 changed files with 4 additions and 4 deletions

View File

@ -8,14 +8,14 @@ import (
"joylink.club/rtsssimulation/umi"
)
// 创建模型仓库实体
// CreateModelStorageEntity 创建模型仓库实体
func CreateModelStorageEntity(w ecs.World, modelManager umi.IModelManager) *ecs.Entry {
e := w.Create(system.ModelStorageComponent)
system.ModelStorageComponent.Set(e, &system.ModelStorageRef{ModelManager: modelManager})
return e
}
// 创建系统时钟实体
// CreateSystemTimerEntity 创建系统时钟实体
func CreateSystemTimerEntity(w ecs.World, systemTime time.Time) *ecs.Entry {
e := w.Create(system.SystemTimerComponent)
system.SystemTimerComponent.Set(e, system.NewSystemTimer(&systemTime))

View File

@ -5,7 +5,7 @@ import (
"joylink.club/rtsssimulation/system"
)
// 创建继电器实体
// CreateRelayEntity 创建继电器实体
func CreateRelayEntity(w ecs.World, relayId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.RelayStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: relayId})

View File

@ -5,7 +5,7 @@ import (
"joylink.club/rtsssimulation/system"
)
// 双机zdj9
// CreateSwitch2jzdj9Entity 双机zdj9
// 默认定位
func CreateSwitch2jzdj9Entity(w ecs.World, switchId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Switch2jZdj9StateComponent, system.MovableObject1Component, system.MovableObject2Component)