2023-08-14 18:06:26 +08:00
|
|
|
package components
|
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/ecs"
|
2023-08-23 15:13:06 +08:00
|
|
|
"joylink.club/rtsssimulation/components/cstate"
|
2023-08-14 18:06:26 +08:00
|
|
|
)
|
|
|
|
|
2023-08-15 16:50:24 +08:00
|
|
|
// 系统时钟组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var SystemTimerComponent = ecs.NewComponentType[cstate.SystemTimer]()
|
2023-08-15 16:50:24 +08:00
|
|
|
|
2023-08-23 18:06:09 +08:00
|
|
|
// 模型仓库引用组件,单例
|
|
|
|
var ModelStorageRefComponent = ecs.NewComponentType[cstate.ModelStorageRef]()
|
|
|
|
|
2023-08-14 18:06:26 +08:00
|
|
|
// 身份组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var DeviceIdentityComponent = ecs.NewComponentType[cstate.DeviceIdentity]()
|
2023-08-14 18:06:26 +08:00
|
|
|
|
2023-08-16 18:13:18 +08:00
|
|
|
// 持有实体标签的组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var EntityTagHandlerComponent = ecs.NewComponentType[cstate.EntityTagHandler]()
|
2023-08-18 10:06:17 +08:00
|
|
|
|
2023-08-25 10:50:39 +08:00
|
|
|
// 可移动设备组件
|
|
|
|
var MovableDeviceStateComponent = ecs.NewComponentType[cstate.MovableDeviceState]()
|
|
|
|
|
|
|
|
// 比率设备组件
|
|
|
|
var PercentageDeviceStateComponent = ecs.NewComponentType[cstate.PercentageDeviceState]()
|
2023-08-16 18:13:18 +08:00
|
|
|
|
2023-08-18 11:23:52 +08:00
|
|
|
// 道岔继电器状态组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var SwitchRelayStateComponent = ecs.NewComponentType[cstate.SwitchRelayState]()
|
2023-08-14 18:06:26 +08:00
|
|
|
|
|
|
|
// 物理区段状态组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var PhysicalSectionStateComponent = ecs.NewComponentType[cstate.PhysicalSectionState]()
|
2023-08-15 18:12:30 +08:00
|
|
|
|
|
|
|
// 信号机状态组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var SignalStateComponent = ecs.NewComponentType[cstate.SignalState]()
|
2023-08-16 15:00:24 +08:00
|
|
|
|
|
|
|
// 信号机显示操作组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var SignalDisplayOperatingComponent = ecs.NewComponentType[cstate.SignalDisplayOperating]()
|
2023-08-16 17:17:20 +08:00
|
|
|
|
2023-08-18 16:15:19 +08:00
|
|
|
// 站台单侧屏蔽门状态组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var PsdStateComponent = ecs.NewComponentType[cstate.PsdState]()
|
2023-08-17 17:39:57 +08:00
|
|
|
|
|
|
|
// 应答器状态组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var BaliseStateComponent = ecs.NewComponentType[cstate.BaliseState]()
|
2023-08-17 17:39:57 +08:00
|
|
|
|
|
|
|
// 列车状态组件
|
2023-08-22 11:00:14 +08:00
|
|
|
var TrainStateComponent = ecs.NewComponentType[cstate.TrainState]()
|
2023-08-22 17:21:21 +08:00
|
|
|
|
|
|
|
// 两档按钮/旋钮状态组件
|
|
|
|
var TowPositionButtonStateComponent = ecs.NewComponentType[cstate.TowPositionButtonState]()
|