Рефактор.
This commit is contained in:
@@ -45,13 +45,13 @@ signal threats_resized(th: Dictionary)
|
||||
func _ready() -> void:
|
||||
Log.info('Модуль обработки целей готов')
|
||||
var threats = {} ## Список целей. Индекс - <номер цели>
|
||||
var unit_key = REPSettings.get_unit_key('уарэп-капсрпб-отп')
|
||||
var unit_key = repsettings.get_unit_key('уарэп-капсрпб-отп')
|
||||
var unit = REPNetwork.units[unit_key]
|
||||
var timer_check_lost: = Timer.new()
|
||||
add_child(timer_check_lost)
|
||||
unit.connect('data_received', Callable(self, 'on_data_capsrpb_received').bind(threats))
|
||||
timer_check_lost.connect('timeout', Callable(self, 'on_timer_check_lost').bind(REPSettings.ThreatParams.time_lost, threats))
|
||||
timer_check_lost.start(REPSettings.ThreatParams.time_lost / 1000.0)
|
||||
timer_check_lost.connect('timeout', Callable(self, 'on_timer_check_lost').bind(repsettings.ThreatParams.time_lost, threats))
|
||||
timer_check_lost.start(repsettings.ThreatParams.time_lost / 1000.0)
|
||||
|
||||
|
||||
## Периодически удаляет устаревшие цели
|
||||
|
||||
Reference in New Issue
Block a user