Ejemplo n.º 1
0
 public void Exit(GameStateBase owner)
 {
     if (null != uiCtr)
     {
         GameObject.Destroy(uiCtr.gameObject);
         uiCtr = null;
     }
 }
Ejemplo n.º 2
0
    public void Enter(GameStateBase owner)
    {
        CursorManager.SetCursor(CursorManager.CursorState.DEFAULT);
//		GameObject prefab = Resources.Load ("CleanScene")as GameObject;
//		GameObject go = GameObject.Instantiate (prefab);
//		uiCtr = go.GetComponent<CleanUI> ();
//		uiCtr.Init (GameData.HasStomach);
        ResourcesManager.Instance.Load("CleanScene", (Object asset) => {
            GameObject go = GameObject.Instantiate((GameObject)asset);
            uiCtr         = go.GetComponent <CleanUI> ();
            uiCtr.Init(GameData.HasStomach);
        });
    }