Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     _bounds = MapLimit.GetCameraBounds(Camera.main);
     _onAsteroidDestroyed = DestroyAsteroid;
     _asteroids = new List<Asteroid>(10);
 }