Реализация автомата в двух состояниях (0 и 3)
This commit is contained in:
@@ -17,19 +17,21 @@ const panika_sectors: Dictionary = {
|
||||
## Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
var nodes: Array = get_tree().get_nodes_in_group('группа-принудительно')
|
||||
$grd_forced/btn_cancel.button_connect('pressed', Callable(self, 'on_btn_cancel_pressed').bind($grd_forced/btn_cancel))
|
||||
$grd_forced/btn_cancel.button_connect('pressed', Callable(self, 'on_btn_cancel_pressed').bind($grd_forced/btn_cancel, nodes))
|
||||
nodes.any(func(btn): btn.button_connect('pressed', Callable(self, 'on_btn_pressed').bind(btn, nodes)))
|
||||
|
||||
|
||||
func on_btn_cancel_pressed(btn):
|
||||
func on_btn_cancel_pressed(btn, nodes):
|
||||
signaller.emit_signal('interfer_off_all')
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
btn.pressed = false
|
||||
nodes.any(func(btn): btn.pressed = false)
|
||||
|
||||
|
||||
func on_btn_pressed(btn_this, btn_others):
|
||||
for btn_other in btn_others: btn_other.set_pressed(btn_this == btn_other)
|
||||
signaller.emit_signal('interfer_off_all')
|
||||
signaller.emit_signal('rto_threat_unsel_all')
|
||||
if btn_this == $grd_forced/btn_panika:
|
||||
signaller.emit_signal('interfer_prenuditelno', panika_sectors)
|
||||
elif btn_this == $grd_forced/btn_jtids:
|
||||
|
||||
@@ -17,7 +17,7 @@ const INTERFER_STATE = {
|
||||
2: 'Ошибка',
|
||||
3: 'Занято',
|
||||
4: 'Неисправность',
|
||||
5: 'Передача' }
|
||||
5: ' ' }
|
||||
|
||||
|
||||
## Состояние выполнения сеанса помехи
|
||||
|
||||
Reference in New Issue
Block a user