少年修仙传客户端代码仓库
client_Wu Xijin
2019-05-07 de7b9ac12a7a96c6509da8009e81abfc258187c4
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4个文件已修改
142 ■■■■■ 已修改文件
Core/GameEngine/Login/Launch.cs 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/SDK/SDKUtility.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Launch/LaunchWin.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/RenderTextureCreator.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Login/Launch.cs
@@ -41,31 +41,40 @@
        tasks.Enqueue(builtInAssetCopyTask);
        tasks.Enqueue(initSettingTask);
#if !UNITY_EDITOR
        tasks.Enqueue(sdkInitedTask);
#endif
#if UNITY_ANDROID
#if  !UNITY_EDITOR
        tasks.Enqueue(assetCopyTask);
        tasks.Enqueue(assetDecompressTask);
#endif
        tasks.Enqueue(getVersionInfoTask);
#endif
        if (!Application.isEditor)
        {
            tasks.Enqueue(sdkInitedTask);
        }
#if UNITY_IOS
        tasks.Enqueue(getVersionInfoTask);
#if !UNITY_EDITOR
        tasks.Enqueue(assetCopyTask);
#endif
#endif
#if UNITY_STANDALONE
#if !UNITY_EDITOR
        tasks.Enqueue(assetCopyTask);
#endif
        tasks.Enqueue(getVersionInfoTask);
#endif
        switch (Application.platform)
        {
            case RuntimePlatform.Android:
                if (Application.isEditor)
                {
                    tasks.Enqueue(getVersionInfoTask);
                }
                else
                {
                    tasks.Enqueue(assetCopyTask);
                    tasks.Enqueue(assetDecompressTask);
                }
                break;
            case RuntimePlatform.IPhonePlayer:
                tasks.Enqueue(getVersionInfoTask);
                if (!Application.isEditor)
                {
                    tasks.Enqueue(assetCopyTask);
                }
                break;
            case RuntimePlatform.WindowsPlayer:
                if (!Application.isEditor)
                {
                    tasks.Enqueue(assetCopyTask);
                }
                tasks.Enqueue(getVersionInfoTask);
                break;
        }
        tasks.Enqueue(checkAssetValidTask);
        tasks.Enqueue(downLoadAssetTask);
@@ -215,9 +224,18 @@
            }
            else
            {
                AndroidCopyAsset();
                IosCopyAsset();
                StandaloneCopyAsset();
                switch (Application.platform)
                {
                    case RuntimePlatform.Android:
                        AndroidCopyAsset();
                        break;
                    case RuntimePlatform.IPhonePlayer:
                        IosCopyAsset();
                        break;
                    case RuntimePlatform.WindowsPlayer:
                        StandaloneCopyAsset();
                        break;
                }
            }
            if (!firstLaunch)
@@ -259,7 +277,6 @@
            timer += Time.deltaTime;
        }
        [Conditional("UNITY_ANDROID")]
        private void AndroidCopyAsset()
        {
            if (!SDKUtility.builtinAssetCopyFinished)
@@ -291,7 +308,6 @@
            }
        }
        [Conditional("UNITY_IOS")]
        private void IosCopyAsset()
        {
            if (!VersionUtility.Instance.InIosAuditTime())
@@ -344,7 +360,6 @@
            }
        }
        [Conditional("UNITY_STANDALONE")]
        private void StandaloneCopyAsset()
        {
            if (!SDKUtility.builtinAssetCopyFinished)
@@ -394,7 +409,6 @@
            }
        }
        [Conditional("UNITY_EDITOR")]
        private void EditorCopyAsset()
        {
            if (!AssetSource.allFromEditor)
@@ -437,12 +451,10 @@
            PackageRegedit.Init();
            Clock.Init();
            // ## PocoManager Start
            if (VersionConfig.Get().appId.Equals("test"))
            {
                SnxxzGame.Instance.gameObject.AddComponent<PocoManager>();
            }
            // ## PocoManager End
            done = true;
        }
@@ -530,8 +542,16 @@
            }
            else
            {
                AndroidCopyAsset();
                IOSorStandaloneCopyAsset();
                switch (Application.platform)
                {
                    case RuntimePlatform.Android:
                        AndroidCopyAsset();
                        break;
                    case RuntimePlatform.IPhonePlayer:
                    case RuntimePlatform.WindowsPlayer:
                        IOSorStandaloneCopyAsset();
                        break;
                }
            }
        }
@@ -542,8 +562,16 @@
            if (!Application.isEditor)
            {
                AndroidProcessCopyComplete();
                IOSorStandaloneProcessCopyComplete();
                switch (Application.platform)
                {
                    case RuntimePlatform.Android:
                        AndroidProcessCopyComplete();
                        break;
                    case RuntimePlatform.IPhonePlayer:
                    case RuntimePlatform.WindowsPlayer:
                        IOSorStandaloneProcessCopyComplete();
                        break;
                }
            }
        }
@@ -558,14 +586,21 @@
            if (!Application.isEditor)
            {
                AndroidWaitCopyAssetComplete();
                IOSorStandaloneWaitCopyAssetComplete();
                switch (Application.platform)
                {
                    case RuntimePlatform.Android:
                        AndroidWaitCopyAssetComplete();
                        break;
                    case RuntimePlatform.IPhonePlayer:
                    case RuntimePlatform.WindowsPlayer:
                        IOSorStandaloneWaitCopyAssetComplete();
                        break;
                }
            }
            ExceptionReport();
        }
        [Conditional("UNITY_ANDROID")]
        private void AndroidCopyAsset()
        {
            switch (VersionConfig.Get().assetAccess)
@@ -590,7 +625,6 @@
            }
        }
        [Conditional("UNITY_IOS"), Conditional("UNITY_STANDALONE")]
        private void IOSorStandaloneCopyAsset()
        {
            if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1)
@@ -640,7 +674,6 @@
            }
        }
        [Conditional("UNITY_ANDROID")]
        private void AndroidWaitCopyAssetComplete()
        {
            if (!SDKUtility.Instance.AssetCopyFinished)
@@ -654,7 +687,6 @@
            }
        }
        [Conditional("UNITY_IOS"), Conditional("UNITY_STANDALONE")]
        private void IOSorStandaloneWaitCopyAssetComplete()
        {
            if (totalCount > 0)
@@ -686,15 +718,12 @@
            {
                done = true;
            }
        }
        [Conditional("UNITY_ANDROID")]
        private void AndroidProcessCopyComplete()
        {
        }
        [Conditional("UNITY_IOS"), Conditional("UNITY_STANDALONE")]
        private void IOSorStandaloneProcessCopyComplete()
        {
            LocalSave.SetString("AssetCopyCompleted_IOSorStandalone", VersionConfig.Get().version);
@@ -1060,8 +1089,7 @@
            m_CurrentStage = LaunchStage.Complete;
            duration = Mathf.Max(0.5f, expectTime);
            LuaUtility.Instance.Init();
            CSharpCallLua.Init();
            ShaderUtility.WarmUpAll();
            SpeechTranslate.Instance.RequestGetToken();
            UI3DModelExhibition.CreateStage();
Core/SDK/SDKUtility.cs
@@ -397,8 +397,12 @@
        }
#elif UNITY_IOS
        IOSMessageHandle(json.ToJson());
#elif UNITY_STANDALONE
        InitFinished=true;
#endif
#endif
    }
    public void HandleSdkMessage(string jsonString)
System/Launch/LaunchWin.cs
@@ -167,7 +167,10 @@
            if (backGroundTimer >= 3f)
            {
                backGroundTimer = 0f;
                m_BackGround.overrideSprite = backGrounds[(++backGroundIndex) % backGrounds.Count];
                if (backGrounds.Count > 1)
                {
                    m_BackGround.overrideSprite = backGrounds[(++backGroundIndex) % backGrounds.Count];
                }
            }
        }
Utility/RenderTextureCreator.cs
@@ -22,8 +22,17 @@
            }
            rt = new RenderTexture(Mathf.RoundToInt(m_Size.x), Mathf.RoundToInt(m_Size.y), 16);
            switch (Application.platform)
            {
                case RuntimePlatform.WindowsEditor:
                case RuntimePlatform.WindowsPlayer:
                    rt.format = RenderTextureFormat.ARGB32;
                    break;
                default:
                    rt.format = RenderTextureFormat.ARGB4444;
                    break;
            }
            rt.format = RenderTextureFormat.ARGB4444;
            rt.useMipMap = false;
            rt.wrapMode = TextureWrapMode.Clamp;
            rt.filterMode = FilterMode.Bilinear;