少年修仙传客户端代码仓库
client_Zxw
2019-01-18 0e614d73052be4d90c22924ca3c925ac9d9ee00d
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4个文件已修改
4个文件已添加
148 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/SceneReplaceConfig.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/SceneReplaceConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/ConfigManager.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/SceneLoader.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/SceneLoader.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/SDK/SDKUtility.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/DungeonStage.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GatheringSoul/GatheringSoulModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/SceneReplaceConfig.cs
New file
@@ -0,0 +1,47 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Friday, January 18, 2019
//--------------------------------------------------------
using UnityEngine;
using System;
namespace TableConfig {
    public partial class SceneReplaceConfig : ConfigBase {
        public int id { get ; private set ; }
        public string objectPath { get ; private set; }
        public string folder { get ; private set; }
        public string resourceName { get ; private set; }
        public override string getKey()
        {
            return id.ToString();
        }
        public override void Parse() {
            try
            {
                id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
                objectPath = rawContents[1].Trim();
                folder = rawContents[2].Trim();
                resourceName = rawContents[3].Trim();
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
        }
    }
}
Core/GameEngine/Model/Config/SceneReplaceConfig.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 16f2983a4c91c6244ad11b4a75876f1f
timeCreated: 1547778246
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/GameEngine/Model/ConfigManager.cs
@@ -224,6 +224,8 @@
        AddAsyncTask<FashionDressCabinetConfig>();
        AddAsyncTask<FashionDressConfig>();
        AddAsyncTask<WeekPartyPointConfig>();
        AddAsyncTask<SceneReplaceConfig>();
        while (!AllCompleted())
        {
            var completedCount = 0;
Core/ResModule/SceneLoader.cs
New file
@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SceneLoader
{
    public static Texture2D LoadTexture(string folder, string name)
    {
        Texture2D texture2D = null;
        if (AssetSource.sceneFromEditor)
        {
#if UNITY_EDITOR
            var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/", folder, "/", name, ".png");
            texture2D = UnityEditor.AssetDatabase.LoadAssetAtPath<Texture2D>(path);
#endif
        }
        else
        {
            var assetInfo = new AssetInfo(StringUtility.Contact("maps/", folder), name);
            texture2D = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as Texture2D;
        }
        if (texture2D == null)
        {
            DebugEx.LogErrorFormat("SceneLoader.LoadTexture() => 加载不到资源: {0}.", name);
        }
        return texture2D;
    }
}
Core/ResModule/SceneLoader.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 9965235d149da744dbefdf8340b2b351
timeCreated: 1547718608
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/SDK/SDKUtility.cs
@@ -514,6 +514,7 @@
                {
                    onFreePlatformLogoutOk();
                }
                FreePlatformInfo = null;
                break;
            case CodeA2U.FreePlatformLogoutFail:
                if (onFreePlatformLogoutFail != null)
@@ -793,6 +794,10 @@
        m_Json.Clear();
        m_Json["code"] = CodeU2A.FreePlatformLogout;
        SendMessageToSDK(m_Json);
        if (ChannelPlatform == E_ChannelPlatform.Yl)
        {
            FreePlatformLogin();
        }
#endif
    }
Fight/Stage/Dungeon/DungeonStage.cs
@@ -401,4 +401,31 @@
                break;
        }
    }
    void SceneResourcesReplace()
    {
        switch (PlayerDatas.Instance.baseData.MapID)
        {
            case 10010:
                SceneResourceReplace10010();
                break;
            default:
                break;
        }
    }
    private void SceneResourceReplace10010()
    {
        var config = Config.Instance.Get<SceneReplaceConfig>(100101);
        if (config != null)
        {
            var groundTexture = SceneLoader.LoadTexture(config.folder, config.resourceName);
            var @object = GameObject.Find(config.objectPath);
            var renderer = @object.GetComponent<Renderer>();
            renderer.material.SetTexture("_MainTex", groundTexture);
        }
    }
}
System/GatheringSoul/GatheringSoulModel.cs
@@ -1643,15 +1643,6 @@
                    }
                }
            }
            GatherSoulItem coreItem;
            if (TryGetItem(coreHole, out coreItem) &&
                SatisfyLevelUp(coreItem, out error))
            {
                levelUpRedpointHole = coreHole;
                levelUpRedpoint.state = RedPointState.Simple;
            }
            else
            {
                levelUpRedpointHole = -1;
                var cost = 0;
                for (int i = 0; i < count; i++)
@@ -1673,7 +1664,6 @@
                if (levelUpRedpointHole != -1)
                {
                    levelUpRedpoint.state = RedPointState.Simple;
                }
            }
        }
        #endregion