Files

17 lines
292 B
C#
Raw Permalink Normal View History

2025-05-13 05:19:58 +03:00
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(Health))]
public class GameoverOnDeath : MonoBehaviour {
public GameController gameController;
void Start () {
GetComponent<Health>().Destroyed += OnDeath;
}
void OnDeath(){
gameController.GameOver();
}
}