Ejemplo n.º 1
0
    private void CheckShowOrHideInput()
    {
        GameNet.GlobalUserInfo    pGlobalUserInfo = GameNet.GlobalUserInfo.GetInstance();
        GameNet.tagGlobalUserData pGlobalUserData = pGlobalUserInfo.GetGlobalUserData();
        if (pGlobalUserData.dwSpreaderID != 0)
        {
            //已经绑定代理人

            if (input != null)
            {
                input.transform.parent.gameObject.SetActive(false);
            }

            if (BindButton != null)
            {
                BindButton.SetActive(false);
            }

            if (BindedInviteNum != null)
            {
                BindedInviteNum.text = Surrogate.IdToInviteCode(pGlobalUserData.dwSpreaderID);
                BindedInviteNum.transform.parent.gameObject.SetActive(true);
            }
        }
        else
        {
            if (input != null)
            {
                input.transform.parent.gameObject.SetActive(true);
            }

            if (BindButton != null)
            {
                BindButton.SetActive(true);
            }

            if (BindedInviteNum != null)
            {
                BindedInviteNum.transform.parent.gameObject.SetActive(false);
            }
        }
    }