少年修仙传客户端代码仓库
Client_PangDeRong
2019-01-07 4885df9ae60acae663f10b11230fb2cace3b174c
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
6个文件已修改
154 ■■■■■ 已修改文件
Core/GameEngine/Login/LoginStage.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/SDK/SDKUtility.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionConfig.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginModel.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginWin.cs 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UIRoot.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Login/LoginStage.cs
@@ -46,7 +46,12 @@
                {
                    if (!loginModel.sdkLogined)
                    {
                        SDKUtility.Instance.FreePlatformLogin();
                        if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj
                         || !SDKUtility.Yj_AppID.Equals("yybgame"))
                        {
                            SDKUtility.Instance.FreePlatformLogin();
                        }
                        OperationLogCollect.Instance.RecordLauchEvent(4);
                        OperationLogCollect.Instance.RecordEvent(4);
                    }
Core/SDK/SDKUtility.cs
@@ -25,6 +25,7 @@
        Sp = 3,// 思璞
        Js = 4,// 极速
        Yj = 5,// 易接
        Yl = 6,// 易乐
    }
    public E_ChannelPlatform ChannelPlatform { get; set; }
@@ -35,6 +36,11 @@
    }
    public static string Yj_SpID
    {
        get; private set;
    }
    public static string Yj_BanHao
    {
        get; private set;
    }
@@ -339,6 +345,10 @@
                {
                    _result = "freeplatform";
                }
                else if (ChannelPlatform == E_ChannelPlatform.Yl)
                {
                    _result = "yileplatform";
                }
                break;
            case RuntimePlatform.IPhonePlayer:
                _result = "ios";//ios平台固定返回ios
@@ -430,19 +440,30 @@
                        else if (_channelPlatform.Equals("yj"))
                        {
                            ChannelPlatform = E_ChannelPlatform.Yj;
                        }
                        else if (_channelPlatform.Equals("yl"))
                        {
                            ChannelPlatform = E_ChannelPlatform.Yl;
                        }
                    }
                }
                if (_dict.Contains("yj_appid"))
                if (ChannelPlatform == E_ChannelPlatform.Yj)
                {
                    Yj_AppID = _json["yj_appid"].ToString();
                    if (_dict.Contains("yj_appid"))
                    {
                        Yj_AppID = _json["yj_appid"].ToString();
                    }
                    if (_dict.Contains("yj_spid"))
                    {
                        Yj_SpID = _json["yj_spid"].ToString();
                    }
                }
                if (_dict.Contains("yj_spid"))
                if (_dict.Contains("banhao"))
                {
                    Yj_SpID = _json["yj_spid"].ToString();
                    Yj_BanHao = _json["banhao"].ToString();
                }
                break;
@@ -512,6 +533,9 @@
                    onFreePlatformPayCancel();
                }
                break;
            case CodeA2U.ExitGame:
                Snxxz.UI.WindowCenter.Instance.Open<Snxxz.UI.ExitGameWin>();
                break;
        }
    }
@@ -565,6 +589,10 @@
         * 回调外部存储根目录地址
         */
        public const int ExternalStorage = 5;
        /**
         * 触发了退出游戏逻辑, 打开二次确认界面
         */
        public const int ExitGame = 6;
        #endregion
    }
@@ -631,6 +659,7 @@
        public const int CreateRole = 106;
        public const int RoleLogin = 107;
        public const int RoleLevelUp = 108;
        public const int TencentLogin = 109;
        /**
         * 极光推送
         * */
@@ -735,6 +764,19 @@
#endif
    }
    public void TencentLogin(string param)
    {
#if !UNITY_EDITOR
        m_Json.Clear();
        m_Json["code"] = CodeU2A.TencentLogin;
        if (!string.IsNullOrEmpty(param))
        {
            m_Json["param"] = param;
        }
        SendMessageToSDK(m_Json);
#endif
    }
    /// <summary>
    /// 自由SDK登出
    /// </summary>
@@ -803,6 +845,10 @@
        {
            m_PaymentTable["RechargeChannel"] = "5";
        }
        else if (ChannelPlatform == E_ChannelPlatform.Yl)
        {
            m_PaymentTable["RechargeChannel"] = "6";
        }
        var _stringBuilder = new System.Text.StringBuilder();
        var _md5Body = _stringBuilder.Append(m_PaymentTable["AppID"]).
System/ClientVersion/VersionConfig.cs
@@ -122,7 +122,17 @@
    public Vector2 logoPosition { get { return m_LogoPosition; } }
    [SerializeField] string m_BanHao;
    public string banHao { get { return m_BanHao; } }
    public string banHao
    {
        get
        {
            if (!string.IsNullOrEmpty(SDKUtility.Yj_BanHao))
            {
                return SDKUtility.Yj_BanHao;
            }
            return m_BanHao;
        }
    }
    public void Read(string _data)
    {
System/Login/LoginModel.cs
@@ -315,6 +315,9 @@
                                       SDKUtility.Yj_AppID + "|" +
                                       SDKUtility.Instance.FreePlatformInfo.accountID);
                        send.ExtraLen = (byte)send.Extra.Length;
                    }else if(SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl)
                    {
                        send.IDType = 6;
                    }
                    send.AccID = sdkLoginResult.account;
                    send.Password = sdkLoginResult.token;
System/Login/LoginWin.cs
@@ -30,6 +30,8 @@
        [SerializeField] Text m_ServerName;
        [SerializeField] protected InputField m_Account;
        [SerializeField] Button m_EnterGame;
        [SerializeField] Button m_QQLogin;
        [SerializeField] Button m_WXLogin;
        [SerializeField] Button m_ServerSelect;
        [SerializeField] Button m_SwitchAccount;
        [SerializeField] Button m_Notice;
@@ -47,6 +49,8 @@
        protected override void AddListeners()
        {
            m_EnterGame.SetListener(EnterGame);
            m_QQLogin.SetListener(QQLogin);
            m_WXLogin.SetListener(WXLogin);
            m_ServerSelect.SetListener(OpenServerListWin);
            m_SwitchAccount.SetListener(SwitchAccount);
            m_Notice.SetListener(VeiwNotice);
@@ -103,6 +107,35 @@
            }
            ChangeUserInfo(model.localSaveAccountName);
            if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj
             && SDKUtility.Yj_AppID.Equals("yybgame")
             && !model.sdkLogined)
            {
                m_EnterGame.gameObject.SetActive(false);
                m_QQLogin.gameObject.SetActive(true);
                m_WXLogin.gameObject.SetActive(true);
                SDKUtility.Instance.onFreePlatformLoginOk += OnLoginOk;
            }
            else
            {
                m_EnterGame.gameObject.SetActive(true);
                m_QQLogin.gameObject.SetActive(false);
                m_WXLogin.gameObject.SetActive(false);
            }
        }
        private void OnLoginOk(SDKUtility.FP_LoginOk arg0)
        {
            if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj
             && SDKUtility.Yj_AppID.Equals("yybgame"))
            {
                m_EnterGame.gameObject.SetActive(true);
                m_QQLogin.gameObject.SetActive(false);
                m_WXLogin.gameObject.SetActive(false);
            }
        }
        protected override void OnAfterOpen()
@@ -120,6 +153,7 @@
        {
            ServerListCenter.Instance.serverSelectEvent -= OnServerChange;
            ServerListCenter.Instance.onServerListRefreshEvent -= OnServerListRefresh;
            SDKUtility.Instance.onFreePlatformLoginOk -= OnLoginOk;
        }
        protected override void OnActived()
@@ -202,6 +236,36 @@
            Login();
        }
        protected void QQLogin()
        {
            if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj)
            {
                return;
            }
            if (!SDKUtility.Yj_AppID.Equals("yybgame"))
            {
                return;
            }
            SDKUtility.Instance.TencentLogin("Login");
        }
        protected void WXLogin()
        {
            if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj)
            {
                return;
            }
            if (!SDKUtility.Yj_AppID.Equals("yybgame"))
            {
                return;
            }
            SDKUtility.Instance.TencentLogin("Loginwx");
        }
        protected void Login()
        {
            var allow = false;
UI/Common/UIRoot.cs
@@ -63,13 +63,16 @@
            if (StageManager.Instance.CurrentStage != null)
            {
                if (Input.GetKeyDown(KeyCode.Escape))
                if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj)
                {
                    if (Input.GetKeyDown(KeyCode.Escape))
                    {
#if UNITY_EDITOR
                    WindowCenter.Instance.Open<ExitGameWin>();
                        WindowCenter.Instance.Open<ExitGameWin>();
#elif UNITY_ANDROID
                    WindowCenter.Instance.Open<ExitGameWin>();
                        WindowCenter.Instance.Open<ExitGameWin>();
#endif
                    }
                }
            }
@@ -84,7 +87,8 @@
        private void EnableCanvas(Transform parent, bool _enabled)
        {
            Canvas canvas = parent.GetComponent<Canvas>();
            if (canvas != null) canvas.enabled = _enabled;
            if (canvas != null)
                canvas.enabled = _enabled;
            foreach (Transform child in parent)
            {
                EnableCanvas(child, _enabled);