rts-sim-module/component/psd.go

63 lines
1.2 KiB
Go
Raw Normal View History

package component
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/component/component_proto"
)
var PsdTag = ecs.NewTag()
var PsdStateType = ecs.NewComponentType[component_proto.PsdState]()
var PsdCircuitType = ecs.NewComponentType[PsdCircuit]()
type PsdCircuit struct {
//屏蔽门驱动继电器
GMJ *ecs.Entry
KMJ4 *ecs.Entry
KMJ8 *ecs.Entry
//屏蔽门表示继电器
MGJ *ecs.Entry
MPLJ *ecs.Entry
}
var PsdDriveCircuitType = ecs.NewComponentType[PsdDriveCircuit]()
// PsdDriveCircuit 屏蔽门驱动电路
type PsdDriveCircuit struct {
//屏蔽门驱动继电器接通状态
GMJ bool
KMJ4 bool
KMJ8 bool
}
var PsdCollectionCircuitType = ecs.NewComponentType[PsdCollectionCircuit]()
type PsdCollectionCircuit struct {
GMJ bool
KMJ4 bool
KMJ8 bool
//MGJ吸起
MGJ_X bool
//MGJ落下
MGJ_L bool
MPLJ_X bool
MPLJ_L bool
}
2023-10-23 17:35:57 +08:00
var AsdListType = ecs.NewComponentType[AsdList]()
// AsdList 滑动门列表
type AsdList struct {
List []*ecs.Entry
}
var AsdMotorStateType = ecs.NewComponentType[AsdMotorState]()
// AsdMotorState 滑动门电机状态
type AsdMotorState struct {
GM bool //向关门方向转动
KM bool //向开门方向转动
MG bool //门关闭状态
MK bool //门开启状态
}