private void Awake() { _playerShip = GetComponent <APlayerShip>(); _waitingTime = new WaitForSeconds(secondsBetweenJumps); _hits = new Collider[10]; _jumpCoroutine = JumpCoroutine; _bounds = MapLimit.GetCameraBounds(Camera.main); _asteroidsLayer = LayerMask.GetMask("Asteroid"); _playerShip.Stats.OnDie += StartCoroutineForJumping; _transform = transform; }
private void Awake() { _bounds = MapLimit.GetCameraBounds(Camera.main); _onAsteroidDestroyed = DestroyAsteroid; _asteroids = new List<Asteroid>(10); }