少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-11 9f427abb586f9d212bfa73d8be1c4607de840fac
2192 Debug文件下载
3个文件已修改
39 ■■■■■ 已修改文件
System/ClientVersion/VersionConfig.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Debug/DebugUtility.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/DebugVersionShow.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionConfig.cs
@@ -25,7 +25,18 @@
    public string clientPackageFlag { get { return m_ClientPackageFlag; } }
    [SerializeField] int m_Branch = 0;
    public int branch { get { return m_Branch; } }
    public int branch {
        get {
            if (DebugUtility.Instance.debugAccount && DebugUtility.Instance.debugBranch >= 0)
            {
                return DebugUtility.Instance.debugBranch;
            }
            else
            {
                return m_Branch;
            }
        }
    }
    [SerializeField] InstalledAsset m_AssetAccess = InstalledAsset.IngoreDownLoad;
    public InstalledAsset assetAccess { get { return m_AssetAccess; } set { m_AssetAccess = value; } }
System/Debug/DebugUtility.cs
@@ -26,6 +26,9 @@
        }
    }
    public int debugBranch = -1;
    public void Init()
    {
        if (VersionConfig.Get().debugVersion)
@@ -36,6 +39,12 @@
        {
            var parentDirectory = Directory.GetParent(Application.persistentDataPath);
            debugAccount = File.Exists(parentDirectory + "/Debug");
            if (debugAccount)
            {
                var json = JsonMapper.ToObject<DebugBranch>(File.ReadAllText(parentDirectory + "/Debug"));
                debugBranch = json.branch;
            }
        }
    }
@@ -72,6 +81,11 @@
    struct DebugAuthority
    {
        public int dbg;
    }
    public class DebugBranch
    {
        public int branch = -1;
    }
}
Utility/DebugVersionShow.cs
@@ -10,8 +10,16 @@
    private void OnEnable()
    {
        m_Version.text = string.Format("版本:{0},序号:{1},分支:{2},客户端标识:{3}",
            VersionConfig.Get().version, VersionConfig.Get().buildIndex, VersionConfig.Get().branch, VersionConfig.Get().clientPackageFlag);
        if (DebugUtility.Instance.debugAccount && DebugUtility.Instance.debugBranch >= 0)
        {
            m_Version.text = string.Format("版本:{0},序号:{1},Debug分支:{2},客户端标识:{3}",
                 VersionConfig.Get().version, VersionConfig.Get().buildIndex, VersionConfig.Get().branch, VersionConfig.Get().clientPackageFlag);
        }
        else
        {
            m_Version.text = string.Format("版本:{0},序号:{1},分支:{2},客户端标识:{3}",
                VersionConfig.Get().version, VersionConfig.Get().buildIndex, VersionConfig.Get().branch, VersionConfig.Get().clientPackageFlag);
        }
    }
}