*
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user