Пример #1
0
 /// <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();
 }
Пример #2
0
 /// <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();
 }
Пример #3
0
 /// <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();
 }
Пример #4
0
 /// <summary>
 /// 关闭等待并且取消网络回调
 /// </summary>
 public void CloseWaitAndCancelCallBack()
 {
     if (waitWindow == null)
     {
         return;
     }
     if (callb != null)
     {
         HttpLite.CancelHttpRequest(callb);
     }
     //waitWindow.Close ();
 }
Пример #5
0
    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);
    }
Пример #6
0
 void Start()
 {
     HttpLite.Init();
 }
Пример #7
0
    public void Send(string serviceUrl, HttpDoneCallback callback, byte[] data)
    {
        string url = Url + serviceUrl;

        HttpLite.HttpRequest(url, callback, data);
    }