少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-01 209a1afb199a230a9dd5ae4143f9bbdfac863302
3335 场景切换重构
1个文件已修改
9 ■■■■■ 已修改文件
Fight/Stage/StageLoad.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageLoad.cs
@@ -60,15 +60,13 @@
        var needLoadResource = true;
        if (command.needLoadResource)
        {
            var fromMapId = command.fromMapId;
            var fromLineId = command.fromLineId;
            if (fromMapId != command.toMapId)
            if (command.fromMapId != command.toMapId)
            {
                needLoadResource = true;
            }
            else
            {
                var config1 = MapResourcesConfig.GetConfig(MapUtility.GetDataMapId(fromMapId), fromLineId);
                var config1 = MapResourcesConfig.GetConfig(MapUtility.GetDataMapId(command.fromMapId), command.fromLineId);
                var config2 = MapResourcesConfig.GetConfig(MapUtility.GetDataMapId(command.toMapId), command.toLineId);
                needLoadResource = config1.MapResources != config2.MapResources;
            }
@@ -139,9 +137,10 @@
        mapIdRecord = mapId;
        lineIdRecord = lineId;
        isLoading = false;
        StageLoadTimeOutCatcher.Stop();
        if (stageLoadProcessor != null)
        {
            StageLoadTimeOutCatcher.Stop();
            DestroyImmediate(stageLoadProcessor.gameObject);
            stageLoadProcessor = null;
        }