using UnityEngine; using System.Collections; [RequireComponent(typeof(Health))] public class GameoverOnDeath : MonoBehaviour { public GameController gameController; void Start () { GetComponent().Destroyed += OnDeath; } void OnDeath(){ gameController.GameOver(); } }