Доработка. Добавлена возможность раскраски секторов антенн в разные цвета (выбор сектора, назначение помехи)
This commit is contained in:
@@ -55,6 +55,7 @@ func _ready() -> void:
|
||||
timer_check_lost.start(repsettings.ThreatParams.time_lost / 1000.0)
|
||||
signaller.connect('rto_threat_sel', Callable(self, 'on_rto_threat_sel').bind(threats))
|
||||
signaller.connect('rto_threat_unsel', Callable(self, 'on_rto_threat_unsel').bind(threats))
|
||||
signaller.connect('rto_threat_unsel_all', Callable(self, 'on_rto_threat_unsel_all').bind(threats))
|
||||
signaller.connect('threat_selected', Callable(self, 'on_threat_selected').bind(threats))
|
||||
signaller.connect('interfer_init', Callable(self, 'on_interfer_init').bind(threats))
|
||||
|
||||
@@ -74,6 +75,12 @@ func on_timer_check_lost(time_lost: int, threats: Dictionary):
|
||||
func on_rto_threat_unsel(th_id, threats): threats[th_id].selected = false
|
||||
|
||||
|
||||
## Снимает выделение со всех целей
|
||||
func on_rto_threat_unsel_all(threats):
|
||||
for th in threats.values():
|
||||
signaller.emit_signal('rto_threat_unsel', th.id)
|
||||
|
||||
|
||||
## Выбирает цель, если нажать по отметке цели.
|
||||
func on_rto_threat_sel(th_id, threats): on_threat_selected(threats[th_id], threats)
|
||||
|
||||
@@ -95,7 +102,6 @@ func on_interfer_init(btn, threats):
|
||||
signaller.emit_signal('interfer_create', btn, sel_threats)
|
||||
|
||||
|
||||
|
||||
## Производит приём целей
|
||||
func on_data_capsrpb_received(unit: capsrpb.CapsRpb, threats: Dictionary):
|
||||
if not unit.json_dic.has('ts'): return
|
||||
|
||||
Reference in New Issue
Block a user