コード例 #1
0
ファイル: AssetVersionUtility.cs プロジェクト: Hengle/Fish
    public static void GetAssetVersionFile()
    {
        Debug.LogFormat("开始获取资源版本文件:时间 {0}", DateTime.Now);
        var remoteUrlRoot   = VersionUtil.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch);
        var assetVersionUrl = StringUtil.Contact(remoteUrlRoot, "/", "AssetsVersion.txt");

        HttpRequest.Instance.RequestHttpGet(assetVersionUrl, OnGetAssetVersionFile);
    }
コード例 #2
0
ファイル: VersionUtil.cs プロジェクト: Hengle/Fish
    public void RequestVersionCheck()
    {
        var tables = new Dictionary <string, string>();

        tables["channel"]     = VersionConfig.Get().appId;
        tables["versioncode"] = VersionConfig.Get().version;
        if (VersionConfig.Get().branch != 0)
        {
            tables["branch"] = VersionConfig.Get().branch.ToString();
        }

        var url = StringUtil.Contact(VERSION_URL, HttpRequest.HashTableToString(tables));

        HttpRequest.Instance.RequestHttpGet(url, this.OnVersionCheckResult);
    }
コード例 #3
0
    IEnumerator Co_Launch()
    {
        if (Application.platform == RuntimePlatform.Android ||
            Application.platform == RuntimePlatform.IPhonePlayer)
        {
            if (AssetsCopyTask.copiedVersion != VersionConfig.Get().version)
            {
                var assetCopy = AssetsCopyTask.BeginCopy(VersionConfig.Get().version);
                while (!assetCopy.done)
                {
                    yield return(null);
                }
            }
        }

        ConfigInitiator.Init();

        yield return(new WaitForSeconds(1f));

        SceneLoad.Instance.LoadLogin();
    }