Пример #1
0
    public static GameFacade GetInstance()
    {
        instance = GameObject.FindObjectOfType <GameFacade> ();

        if (instance == null)
        {
            throw new System.Exception("GameFacade不存在場景中,請在場景添加");
        }
        instance.Initialize();

        return(instance);
    }
Пример #2
0
 public static GameFacade GetInstance()
 {
     if (instance == null)
     {
         instance = GameObject.FindObjectOfType <GameFacade>();
         if (instance == null)
         {
             throw new Exception("GameManager不存在於場景中,請在場景中添加");
         }
         instance.Initialize();
     }
     return(instance);
 }