少年修仙传客户端代码仓库
client_linchunjie
2018-08-11 792a4be031fb0f619fed5e536dd898e17c25ece8
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
48 ■■■■ 已修改文件
Core/GameEngine/Model/ConfigManager.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/AssetVersion/InGameDownTestUtility.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionConfig.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/ConfigManager.cs
@@ -10,11 +10,8 @@
public class ConfigManager : Singleton<ConfigManager>
{
    public static string CustomIV = "4vHKRj3yfzU=";
    public static string CustomKey = "xhVs6DRXLfUGxw+AhtfQdpQGoa+8SA9d";
    protected string[] lineStep = new string[] { "\r\n","\n" }; //行间隔体
    protected string[] rowStep = new string[] { "\t" }; //段间隔体
    public readonly static string CustomIV = "4vHKRj3yfzU=";
    public readonly static string CustomKey = "xhVs6DRXLfUGxw+AhtfQdpQGoa+8SA9d";
    bool isPlaying = true;
@@ -403,7 +400,7 @@
                {
                    if (_task.assetPath == AssetPath.ResourceOut)
                    {
                        lines = File.ReadAllLines(_task.filePath,Encoding.UTF8);
                        lines = File.ReadAllLines(_task.filePath, Encoding.UTF8);
                    }
                    else if (_task.assetPath == AssetPath.External)
                    {
@@ -422,7 +419,8 @@
                        var crypS = new CryptoStream(tableMs, decryptor, CryptoStreamMode.Read);
                        sr = new StreamReader(crypS, Encoding.UTF8);
                        var content = sr.ReadToEnd();
                        lines = content.Split(lineStep, StringSplitOptions.None);
                        lines = content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
                    }
                    _task.state = TaskState.ReadFileSuccess;
@@ -457,7 +455,7 @@
                    var container = _task.container as Dictionary<string, ConfigBase>;
                    for (int i = 3; i < _task.contentLines.Length; i++)
                    {
                        var contents = _task.contentLines[i].Split(rowStep, StringSplitOptions.None);
                        var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
                        if (contents.Length <= 1)
                        {
                            continue;
@@ -537,7 +535,7 @@
            case AssetPath.Resource:
                path = StringUtility.Contact("Config/", fileName);
                var textAsset = Resources.Load<TextAsset>(path);
                lines = textAsset.text.Split(lineStep, StringSplitOptions.None);
                lines = textAsset.text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
                break;
            case AssetPath.ResourceOut:
                path = StringUtility.Contact(ResourcesPath.CONFIG_FODLER, "/", fileName, ".txt");
@@ -562,7 +560,7 @@
                var crypS = new CryptoStream(ms, decryptor, CryptoStreamMode.Read);
                var sr = new StreamReader(crypS, Encoding.UTF8);
                var content = sr.ReadToEnd();
                lines = content.Split(lineStep, StringSplitOptions.None);
                lines = content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
                break;
        }
@@ -591,7 +589,7 @@
        {
            for (int i = 3; i < _task.contentLines.Length; i++)
            {
                var contents = _task.contentLines[i].Split(rowStep, StringSplitOptions.None);
                var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
                if (contents.Length <= 1)
                {
                    continue;
System/AssetVersion/InGameDownTestUtility.cs
@@ -15,12 +15,34 @@
    public static bool isWifi {
        get { return LocalSave.GetBool("InGameDownLoadWifi", true); }
        set { LocalSave.SetBool("InGameDownLoadWifi", value); }
    }
    public static bool isPartPackage {
        get { return LocalSave.GetBool("InGameDownLoadPartPackage", false); }
        set { LocalSave.SetBool("InGameDownLoadPartPackage", value); }
    }
    public static void ClearAssets()
    {
        Directory.Delete(Application.persistentDataPath, true);
        LocalSave.DeleteKey("HasDownLoadFullAsset");
    }
    }
#if UNITY_EDITOR
    [RuntimeInitializeOnLoadMethod]
    public static void Init()
    {
        if (InGameDownTestUtility.enable)
        {
            VersionConfig.Get().assetAccess = InstalledAsset.NullAsset;
        }
        else
        {
            VersionConfig.Get().assetAccess = InstalledAsset.IngoreDownLoad;
        }
        VersionConfig.Get().partAssetPackage = InGameDownTestUtility.isPartPackage;
    }
#endif
}
System/ClientVersion/VersionConfig.cs
@@ -28,10 +28,10 @@
    public int branch { get { return m_Branch; } }
    [SerializeField] InstalledAsset m_AssetAccess = InstalledAsset.IngoreDownLoad;
    public InstalledAsset assetAccess { get { return m_AssetAccess; } }
    public InstalledAsset assetAccess { get { return m_AssetAccess; } set { m_AssetAccess = value; } }
    [SerializeField] bool m_PartAssetPackage = false;
    public bool partAssetPackage { get { return m_PartAssetPackage; } }
    public bool partAssetPackage { get { return m_PartAssetPackage; } set { m_PartAssetPackage = value; } }
    [SerializeField] string m_ProductName = string.Empty;
    public string productName { get { return m_ProductName; } }