rts-sim-module/system/button_system.go

14 lines
334 B
Go
Raw Normal View History

2023-09-25 15:39:03 +08:00
package system
2023-09-26 11:29:50 +08:00
import "joylink.club/ecs"
2023-09-26 10:58:56 +08:00
// ButtonState 广义按钮开关状态,开关有三个接点,分别为公共接点、常开点和常闭点
2023-09-25 15:39:03 +08:00
type ButtonState struct {
2023-09-26 11:29:50 +08:00
//true-公共接点接通常开点false-公共接点接通常闭点
2023-09-26 10:58:56 +08:00
Ckd bool
2023-09-25 15:39:03 +08:00
}
2023-09-26 11:29:50 +08:00
var (
ButtonStateComponent = ecs.NewComponentType[ButtonState]()
)