47 lines
1.5 KiB
Go
47 lines
1.5 KiB
Go
package components
|
|
|
|
import (
|
|
"joylink.club/ecs"
|
|
"joylink.club/rtsssimulation/state"
|
|
)
|
|
|
|
// 系统时钟组件
|
|
var SystemTimerComponent = ecs.NewComponentType[state.SystemTimer]()
|
|
|
|
// 身份组件
|
|
var DeviceIdentityComponent = ecs.NewComponentType[state.DeviceIdentity]()
|
|
|
|
// 持有实体标签的组件
|
|
var EntityTagHandlerComponent = ecs.NewComponentType[state.EntityTagHandler]()
|
|
|
|
// 百分比设备组件
|
|
var PercentageDeviceComponent = ecs.NewComponentType[state.PercentageDeviceState]()
|
|
var PercentageDeviceOperatingComponent = ecs.NewComponentType[state.PercentageDeviceOperating]()
|
|
|
|
// 道岔继电器状态组件
|
|
var SwitchRelayStateComponent = ecs.NewComponentType[state.SwitchRelayState]()
|
|
|
|
// 物理区段状态组件
|
|
var PhysicalSectionStateComponent = ecs.NewComponentType[state.PhysicalSectionState]()
|
|
|
|
// 信号机状态组件
|
|
var SignalStateComponent = ecs.NewComponentType[state.SignalState]()
|
|
|
|
// 信号机显示操作组件
|
|
var SignalDisplayOperatingComponent = ecs.NewComponentType[state.SignalDisplayOperating]()
|
|
|
|
// 单个屏蔽门状态组件
|
|
var PsdCellStateComponent = ecs.NewComponentType[state.PsdCellState]()
|
|
|
|
// 单个屏蔽门操作组件
|
|
var PsdCellOperatingComponent = ecs.NewComponentType[state.PsdCellOperating]()
|
|
|
|
// 站台单侧所有单个屏蔽门状态组件
|
|
var PsdStateComponent = ecs.NewComponentType[state.PsdState]()
|
|
|
|
// 应答器状态组件
|
|
var BaliseStateComponent = ecs.NewComponentType[state.BaliseState]()
|
|
|
|
// 列车状态组件
|
|
var TrainStateComponent = ecs.NewComponentType[state.TrainState]()
|