Пример #1
0
    /// <summary>
    /// 登录的处理
    /// </summary>
    /// <param name="retCode"></param>
    private void OnLogin(short retCode, string mess)
    {
        switch (retCode)
        {
        case 0:
            //成功
            UIManager.Instance.HideUIPanel(UIDefind.UIAccount);
            UIManager.Instance.ShowUIPanel(UIDefind.UIMain);
            break;

        case -1:
            //失败 玩家在线
            MessageTip.Instance.Show(mess);
            view.EnterInteractable = true;
            view.ResetLoginInput();
            break;

        case -2:
            //账号密码错误
            MessageTip.Instance.Show(mess);
            view.EnterInteractable = true;
            view.ResetLoginInput();
            break;

        default:
            break;
        }
    }