Рефактор. Переписан автомат состояний для работы с ЯУ-07 в ПРД.
This commit is contained in:
@@ -59,8 +59,10 @@ func _ready() -> void:
|
||||
unit_5p28.connect('get_threats', Callable(self, 'on_get_threats').bind(unit_5p28, threats))
|
||||
timer_check_lost.connect('timeout', Callable(self, 'on_timer_check_lost').bind(settings.ThreatParams.time_lost, threats))
|
||||
timer_check_lost.start(settings.ThreatParams.time_lost / 1000.0)
|
||||
timer_aoa_update.connect('timeout', Callable(self, 'on_timer_aoa_update').bind(threats))
|
||||
timer_aoa_update.start(1.00)
|
||||
timer_aoa_update.connect('timeout', Callable(self, 'on_timer_aoa_update').bind(threats, timer_aoa_update))
|
||||
timer_aoa_update.start(3.0)
|
||||
timer_aoa_update.one_shot = true
|
||||
|
||||
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))
|
||||
@@ -80,8 +82,9 @@ func on_timer_check_lost(time_lost: int, threats: Dictionary):
|
||||
call_deferred('emit_signal', 'threats_resized', threats)
|
||||
|
||||
|
||||
func on_timer_aoa_update(threats:Dictionary):
|
||||
func on_timer_aoa_update(threats:Dictionary, tmr):
|
||||
signaller.emit_signal('th_aoa_update', threats)
|
||||
tmr.start(1.0)
|
||||
|
||||
## отправляет словарь целей в юнит, для запаковки и отправки в 5П28.
|
||||
func on_get_threats(unit, threats): unit.pack_threats(threats)
|
||||
|
||||
Reference in New Issue
Block a user