/// <summary> /// Switchs to specific scene synchronously by name. /// </summary> /// <param name="scene">Scene Name.</param> static public void SwitchToScene(string sceneName) { Resources.UnloadUnusedAssets(); HttpLite.ClearHttpRequest(); CurrentSceneName = sceneName; Application.LoadLevel(sceneName); m_currentSceneID = Application.loadedLevel; Resources.UnloadUnusedAssets(); GC.Collect(); }
/// <summary> /// Switchs to specific scene synchronously by ID. /// </summary> /// <param name="sceneId">Scene identifier.</param> static public void SwitchToScene(int sceneID) { Resources.UnloadUnusedAssets(); m_currentSceneID = sceneID; HttpLite.ClearHttpRequest(); Application.LoadLevel(CurrentSceneID); CurrentSceneName = Application.loadedLevelName; Resources.UnloadUnusedAssets(); GC.Collect(); }
/// <summary> /// Swtichs to previous scene synchronously. /// </summary> static public void SwtichToPreviousScene() { Resources.UnloadUnusedAssets(); m_currentSceneID = Application.loadedLevel; m_currentSceneID--; HttpLite.ClearHttpRequest(); Application.LoadLevel(CurrentSceneID); CurrentSceneName = Application.loadedLevelName; Resources.UnloadUnusedAssets(); GC.Collect(); }
/// <summary> /// 关闭等待并且取消网络回调 /// </summary> public void CloseWaitAndCancelCallBack() { if (waitWindow == null) { return; } if (callb != null) { HttpLite.CancelHttpRequest(callb); } //waitWindow.Close (); }
protected void SendData <K>(K msg, HttpDoneCallback callback, bool openWait = false, bool askNet = false) where K : IExtensible { if (askNet) { if (Application.internetReachability == NetworkReachability.NotReachable) { Main.Instance.SDKManager.OpenNet(); return; } } if (openWait) { Main.Instance.GameNetwork.OpenWaitWindow(callback); } HttpLite.HttpRequest <K>(Main.Instance.GameNetwork.Url + ServiceUrl, callback, msg); }
void Start() { HttpLite.Init(); }
public void Send(string serviceUrl, HttpDoneCallback callback, byte[] data) { string url = Url + serviceUrl; HttpLite.HttpRequest(url, callback, data); }