Ejemplo n.º 1
0
        public void Serialize(RoomPlayerInfo playerInfo)
        {
            mRoleID           = playerInfo.m_nRoleID;
            mRoleName         = playerInfo.m_strRoleName;
            mIsHost           = playerInfo.m_bIsHost;
            mRoleType         = (RoleRoomType)playerInfo.m_nRoleType;
            m_bIsBoss         = playerInfo.m_bIsBoss;
            mRolePos          = playerInfo.m_nRolePos;
            mRoleState        = (RoleRoomState)playerInfo.m_nRoleState;
            mRoleSex          = (Sex_Type)playerInfo.m_nRoleSex;
            mRoleSkin         = playerInfo.m_nRoleSkin;
            mDanceGroup       = playerInfo.m_strDanceGroup;
            mDanceGroupPos    = playerInfo.m_nDanceGroupPos;
            mDanceGroupBadge  = playerInfo.m_nDanceGroupBadge;
            mDanceGroupEffect = playerInfo.m_nDanceGroupEffect;

            m_bIsVIP          = playerInfo.m_bIsVIP;
            m_nVIPLevel       = playerInfo.m_nVIPLevel;
            m_nTransformId    = playerInfo.m_nTransformId;
            m_nSkinCandyColor = playerInfo.m_nSkinCandyColor;

            m_nCurVehicleID      = playerInfo.m_nCurVehicleID;
            m_nCurVehicleOwnerID = playerInfo.m_nCurVehicleOwnerID;
            m_nCurVehiclePos     = playerInfo.m_nCurVehiclePos;
        }
Ejemplo n.º 2
0
    public void SetPlayerState(bool hasPlayer, bool host, RoleRoomState state)
    {
        host &= hasPlayer;

        bool isPrepare = hasPlayer & (state == RoleRoomState.Ready) && !host;
        bool isEquip   = hasPlayer & (state == RoleRoomState.Equip) && !host;

        if (m_RoomHost != null)
        {
            m_RoomHost.SetActive(host);
        }

        if (m_RoomHostRender != null)
        {
            m_RoomHostRender.enabled = host;
        }

        if (m_RoomDancerRender != null)
        {
            m_RoomDancerRender.enabled = !host;
        }

        if (m_Prepare != null)
        {
            m_Prepare.SetActive(isPrepare);
        }

        if (m_Equip != null)
        {
            m_Equip.SetActive(isEquip);
        }
    }