private static int LoadLevel(ILuaState lua) { string levelName = lua.ChkString(1); string loadingFx = lua.OptString(2, null); WNDLoading.LoadLevel(levelName, loadingFx); return(0); }
public static void LoadLevel(string levelPath, string loadingFx) { if (instance == null || !instance.gameObject.activeInHierarchy) { UIManager.CleanLevel(); GameObject go = UIManager.Instance.CreateWindow("UI/WNDLoading", 1); WNDLoading wnd = go.GetComponent <WNDLoading>(); wnd.levelToLoad = levelPath; wnd.loadingFx = loadingFx;; } }
private void Awake() { instance = this; }