少年修仙传客户端代码仓库
client_Wu Xijin
2019-06-10 97839aca5fc1f94867671079860350d99f389b2d
3973 【2.0】【BUG】切图黑屏会闪一下
5个文件已修改
56 ■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageLoad.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageLoadProcessor.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Loading/LoadingWin.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/CameraUtility.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs
@@ -60,10 +60,6 @@
        GameObjectPoolManager.Instance.UnLoadAll();
        DropItemManager.ReleaseAll();
        ClientDropItemUtility.Instance.ReleaseAll();
        if (PlayerDatas.Instance.baseData.MapID == package.MapID)
        {
            WindowCenter.Instance.Close<LoadingWin>();
        }
        LocalSave.SetInt(RECORDPREMAPID_KEY, PlayerDatas.Instance.baseData.MapID);
Fight/Stage/StageLoad.cs
@@ -8,10 +8,8 @@
public class StageLoad : SingletonMonobehaviour<StageLoad>
{
    StageLoadProcessor stageLoadProcessor;
    public float progress
    {
        get
        {
    public float progress {
        get {
            if (stageLoadProcessor != null)
            {
                return stageLoadProcessor.progress;
@@ -24,16 +22,13 @@
    }
    Stage m_CurrentStage;
    public Stage currentStage
    {
    public Stage currentStage {
        get { return m_CurrentStage; }
        set { m_CurrentStage = value; }
    }
    public Stage.E_StageType stageType
    {
        get
        {
    public Stage.E_StageType stageType {
        get {
            return (currentStage != null && currentStage is DungeonStage) ? Stage.E_StageType.Dungeon : Stage.E_StageType.MainCity;
        }
    }
Fight/Stage/StageLoadProcessor.cs
@@ -29,6 +29,7 @@
    public void Complete(int mapId, int lineId, bool record)
    {
        WindowCenter.Instance.Close<LoadingWin>();
        StageLoad.Instance.ReportComplete(mapId, lineId, record);
    }
@@ -214,7 +215,7 @@
        public override void Begin()
        {
            duration = 0.2f;
            duration = 0.1f;
            SceneManager.LoadScene("Empty");
        }
@@ -287,7 +288,7 @@
            timer += Time.deltaTime;
            if (unloadUnUsedOperation != null)
            {
                done = unloadUnUsedOperation.isDone && timer > 0.1f;
                done = unloadUnUsedOperation.isDone;
                progress = unloadUnUsedOperation.progress;
            }
            else
@@ -438,7 +439,7 @@
            timer += Time.deltaTime;
            if (operation != null)
            {
                done = operation.isDone && timer > 0.3f;
                done = operation.isDone;
                progress = operation.progress;
            }
            else
@@ -540,7 +541,6 @@
        public override void Begin()
        {
            StageLoad.Instance.BroadcastStageLoadEndEvent();
            WindowCenter.Instance.Close<LoadingWin>();
            SystemSetting.Instance.SetGameFps(SystemSetting.Instance.GetGameFps());
            done = true;
System/Loading/LoadingWin.cs
@@ -8,7 +8,6 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using LitJson;
using System.Text.RegularExpressions;
@@ -20,7 +19,9 @@
        public static int targetMapResId = 0;
        public static bool isCrossServerOneVsOne = false;
        [SerializeField] RawImage m_ScreenShotCut;
        [SerializeField] UIAlphaTween m_UIAlphaTween;
        [SerializeField] RectTransform m_ContainerNormal;
        [SerializeField] Image m_BackGround;
        [SerializeField] RectTransform m_ContainerFunctions;
@@ -64,6 +65,8 @@
        protected override void OnPreClose()
        {
            isCrossServerOneVsOne = false;
            CameraUtility.StopShotCut(m_ScreenShotCut);
            if (!AssetSource.uiFromEditor)
            {
                AssetBundleUtility.Instance.UnloadAssetBundle("ui/sprite/loading", true, false);
@@ -78,6 +81,8 @@
        protected override void OnActived()
        {
            base.OnActived();
            CameraUtility.ScreenShotCut(m_ScreenShotCut, null, false, false);
            m_UIAlphaTween.Play(Display);
        }
Utility/CameraUtility.cs
@@ -61,7 +61,6 @@
        return uiposition;
    }
    public static Vector3 ScreenToUIPosition(Vector3 _screenPosition)
    {
        if (CameraManager.uiCamera == null)
@@ -104,7 +103,7 @@
        }
    }
    public static void ScreenShotCut(RawImage _image, Action _callBack, bool _onlySceneCamera = false)
    public static void ScreenShotCut(RawImage _image, Action _callBack, bool _onlySceneCamera = false, bool blur = true)
    {
        if (_image == null)
        {
@@ -112,26 +111,30 @@
        }
        var screenRect = new Rect(0, 0, ResolutionUtility.currentResolution.x - 1, ResolutionUtility.currentResolution.y - 1);
        SnxxzGame.Instance.StartCoroutine(Co_ScreenShotCut(_image, _callBack, _onlySceneCamera));
        SnxxzGame.Instance.StartCoroutine(Co_ScreenShotCut(_image, _callBack, _onlySceneCamera, blur));
    }
    static WaitForEndOfFrame waitForEndOfFrame = new WaitForEndOfFrame();
    static IEnumerator Co_ScreenShotCut(RawImage _image, Action _callBack, bool _onlySceneCamera = false)
    static IEnumerator Co_ScreenShotCut(RawImage _image, Action _callBack, bool _onlySceneCamera = false, bool blur = true)
    {
        if (_onlySceneCamera)
        {
            CameraManager.uiCamera.enabled = false;
        }
        for (int i = 0; i < blurs.Count; i++)
        if (blur)
        {
            if (_onlySceneCamera && blurs[i].gameObject == CameraManager.uiCamera.gameObject)
            for (int i = 0; i < blurs.Count; i++)
            {
                continue;
            }
                if (_onlySceneCamera && blurs[i].gameObject == CameraManager.uiCamera.gameObject)
                {
                    continue;
                }
            blurs[i].enabled = true;
                blurs[i].enabled = true;
            }
        }
        _image.color = _image.color.SetA(0);
        yield return waitForEndOfFrame;
@@ -141,6 +144,7 @@
        texture2d.Apply();
        _image.texture = texture2d;
        _image.color = _image.color.SetA(1);
        for (int i = 0; i < blurs.Count; i++)
        {
            blurs[i].enabled = false;