Files
MetalGear2D.Unity/Assets/Scripts/GameoverOnDeath.cs
T
2025-05-13 05:19:58 +03:00

17 lines
292 B
C#

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();
}
}