using System.Collections; using System.Collections.Generic; using System; using UnityEngine; using UnityEngine.Events; public class GameManager : MonoBehaviour { public static GameManager Instance { get; private set; } public Action OnPlayerDied; void Awake() { if (Instance != null) { Instance = this; DontDestroyOnLoad(gameObject); } Destroy(gameObject); } void Start() { } public void playerDied(int who) { Debug.Break(); } // Update is called once per frame void Update() { } }