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

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

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