Рефакторинг

This commit is contained in:
sasha80
2023-08-10 11:55:22 +03:00
parent 1a410593da
commit 0908185d41
2 changed files with 9 additions and 9 deletions

View File

@@ -46,9 +46,9 @@ func _ready() -> void:
Log.info('Модуль обработки целей готов')
var unit_key = REPSettings.get_unit_key('уарэп-капсрпб-отп')
var unit = REPNetwork.units[unit_key]
unit.connect('data_received', Callable(self, 'on_data_capsrpb_received'))
var timer_check_lost: = Timer.new()
add_child(timer_check_lost)
unit.connect('data_received', Callable(self, 'on_data_capsrpb_received'))
timer_check_lost.connect('timeout', Callable(self, 'on_timer_check_lost').bind(unit, REPSettings.ThreatParams.time_lost[0]))
timer_check_lost.start(REPSettings.ThreatParams.time_lost[0] / 2.0)