예제 #1
0
 public void OnEnter()
 {
     LancherLoadUtils.Load(context.serverURL, 5, context.loadingServerConfigProgress)
     .Then(LoadServerJson)
     .Done(StateComplete)
     .Catch(CatchException);
 }
예제 #2
0
    /// <summary>
    /// 显示Notice
    /// </summary>
    private void ShowNotice()
    {
        if (window == null)
        {
            Debug.LogWarning("这里不应该为空");
            return;
        }

        window.errorNetWorkObj.ToggleActive(false);
        window.AnnouncementObj.ToggleActive(true);
        window.LoadingObj.ToggleActive(false);

        string path = string.Format("{0}{1}", /*"192.168.17.63:8080"*/ context.serverInfo.loginServerUrl, "//login-notice/list");

        ReadGameFile();

        LancherLoadUtils.Load(path, 10)
        .Then(NoticeRepose)
        .Catch(ExceptionHandler);

        var button = window.AnnouncementObj.exit.GetComponent <Button>();

        if (button != null)
        {
            button.onClick.AddListener(ClickCloseHandler);
        }
    }
예제 #3
0
    public void OnEnter()
    {
        var localURLPath = LancherPathUtils.GetWWWStreamingPath(LancherPathConst.ResourceConfigPath);

        LancherLoadUtils.Load(localURLPath, 10, context.loadingResourcesConfigProgress)
        .Then(SaveTextToBridge)
        .Done(LoadResConfigComplete)
        .Catch(CatchException);
    }
예제 #4
0
    public void OnEnter()
    {
        var localURLPath = LancherPathUtils.GetWWWStreamingPath(LancherPathConst.ConfigPath);

        LancherLoadUtils.Load(localURLPath, 3)
        .Then(ParseWWWPrepareServerPath)
        .Done(JumpToLoadHttpServerConfig)
        .Catch(CatchException);
    }
예제 #5
0
    public void OnEnter()
    {
        if (!IsHaveLogoVideoInCache())
        {
            var localURLPath = LancherPathUtils.GetWWWStreamingPath(LancherPathConst.ResourceLogoVideoPath);

            LancherLoadUtils.Load(localURLPath, 10, context.loadingLogoVideoProgress)
            .Then(SaveLogoVideoToCache)
            .Done(LoadLogoVideoComplete)
            .Catch(CatchException);
        }
        else
        {
            LoadLogoVideoComplete(null);
        }
    }
예제 #6
0
 private void LoadDLL()
 {
     if (context.nocodeAssembly != null)
     {
         ExecuteMain(context.nocodeAssembly);
     }
     else
     {
         for (int i = 0; i < dllNameArray.Length; i++)
         {
             dllNameArray[i] = string.Format("{0}/{1}", context.serverInfo.resServerUrl, dllNameArray[i]);
         }
         //Loading那边一直在检查加载进度 直到完毕后 才会跳转下一个状态
         LancherLoadUtils
         .LoadArray(dllNameArray, 20, new LancherProgressHolder[] { context.loadingDLLProgress })
         .Then(LoadDLLComplete)
         .Catch(LoadDLLError);
     }
 }