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