Esempio n. 1
0
 private void Awake()
 {
     _audioSource = GetComponent <AudioSource>();
     Assert.IsNotNull(_audioSource);
     _shipHealth = GetComponent <ShipHealth>();
     Assert.IsNotNull(_shipHealth);
     _shipHealth.OnDied += Play;
 }
Esempio n. 2
0
        private void Awake()
        {
            _collider = GetComponent <BoxCollider2D>();

            _shipHealth         = GetComponent <ShipHealth>();
            _shipHealth.OnDied += Death;

            GameManager.OnGameStarts += ShowModel;
            GameManager.OnGameOver   += HideModel;
            GameManager.OnGameWin    += HideModel;
        }
Esempio n. 3
0
 private void Awake()
 {
     _shipHealth         = GetComponent <ShipHealth>();
     _shipHealth.OnDied += Play;
 }