public override void Kill() { shipStats.Health -= 1; if (shipStats.Health == 0) { gameObject.SetActive(false); LevelManager.KillEnemy(this); return; } StartCoroutine(ShipRendererBehaviour.AnimColor(Color.red)); }
public override void Kill() { ShipStats.Health -= 1; UIPanelBehaviour.SetHealth(ShipStats.Health, false); if (ShipStats.Health == 0) { ScreenManager.ActiveLoseScreen(); LevelManager.OnEndLevel(); gameObject.SetActive(false); return; } StartCoroutine(ShipRendererBehaviour.AnimColor(Color.red)); }