This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class SingletonPattern<T> : MonoBehaviour where T : SingletonPattern<T> | |
{ | |
public static T Instance; | |
protected virtual void Awake() | |
{ | |
if (Instance != null) | |
{ | |
Destroy(this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Assets.Scripts.Events | |
{ | |
public static class EventBroker | |
{ |