private void Awake() { _audioSource = GetComponent <AudioSource>(); Assert.IsNotNull(_audioSource); _shipHealth = GetComponent <ShipHealth>(); Assert.IsNotNull(_shipHealth); _shipHealth.OnDied += Play; }
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; }