private void Awake() { _unitService = ServiceLocator.Get <UnitService>(); _unitService.UnitCreated += UnitServiceOnUnitCreated; _unitService.UnitDestroyed += UnitServiceOnUnitDestroyed; _units = _unitService.GetAllPlayerUnits().ToList(); _gameStateService = ServiceLocator.Get <GameStateService>(); _gameStateService.GameFinishing += OnGameFinishing; if (_units.Count != 0) { _curTarget.y = CalcAveragePosition(); _update = UpdateTargetToUnitAvg; } else { _curTarget = transform.position; } }