Ejemplo n.º 1
0
    private void Awake()
    {
        if (GameManagerScript.instance == null)
        {
            GameManagerScript.instance = this;
        }
        else
        {
            Destroy(this);
        }

        eventController    = GetComponent <EventController>();
        this.changeHandler = new GameStateChangeHandler(this);
    }
Ejemplo n.º 2
0
 public void RemoveOnStateChangeBind(GameStateChangeHandler action)
 {
     OnStateChangeEvent -= action;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Function will be called when a new state is enterdt
 /// </summary>
 /// <param name="action"></param>
 public void BindOnStateChange(GameStateChangeHandler action)
 {
     OnStateChangeEvent += action;
 }