69 lines
1.7 KiB
C++
69 lines
1.7 KiB
C++
#pragma once
|
|
#include "cocos2d.h"
|
|
#include "IClientUserItem.h"
|
|
|
|
class GamePlayer
|
|
{
|
|
public:
|
|
GamePlayer(IClientUserItem* pUserItem);
|
|
~GamePlayer();
|
|
public:
|
|
void setUserItem(IClientUserItem* pItem);
|
|
IClientUserItem* getUserItem(bool bAssert = true);
|
|
public:
|
|
uint16 GetTableID();
|
|
uint16 GetChairID();
|
|
uint8 GetUserStatus();
|
|
SCORE GetUserScore();
|
|
SCORE SetUserScore(SCORE score);
|
|
uint16 GetFaceID();
|
|
uint8 GetGender();
|
|
uint32 GetUserID();
|
|
uint32 GetGameID();
|
|
SCORE GetUserGrade();
|
|
std::string GetLogonIp();
|
|
std::string GetHeadHttp();
|
|
void SetHeadHttp(std::string strHttp);
|
|
//用户昵称;
|
|
std::string GetNickName(bool isu8 = true);
|
|
//公会名称;
|
|
std::string GetUnionName(bool isu8 = true);
|
|
|
|
//用户信息;
|
|
tagUserInfo * GetUserInfo();
|
|
//用户地里位置;
|
|
tagUserAddr& GetLocation();
|
|
void SetLocation(CMD_GF_S_UserLocation *plocation);
|
|
void SetLocation(tagUserAddr *pUserAddr);
|
|
|
|
//public:
|
|
// virtual void PlayerEnter(){};
|
|
// virtual void PlayerLeave(){ m_UserLocation.ResetData(); };
|
|
// virtual void upPlayerInfo(){};
|
|
// virtual void upPlayerState(){};
|
|
|
|
public:
|
|
//玩家进入;
|
|
virtual void PlayerEnter(){};
|
|
//玩家离开;
|
|
virtual void PlayerLeave(){};
|
|
//玩家信息改变;
|
|
virtual void upPlayerInfo(){};
|
|
//玩家状态改变;
|
|
virtual void upPlayerState(){};
|
|
//显示玩家聊天内容;
|
|
virtual void showChatInfo(const std::string strChatString){};
|
|
//显示语音气泡;
|
|
virtual void showVoiceBubble(){};
|
|
//隐藏语音气泡;
|
|
virtual void hideVoiceBubble(){};
|
|
//设置是否允许离开;
|
|
virtual void setAllowLeave(bool isAllow){ m_isAllowLeave = isAllow; }
|
|
//设置显示;
|
|
virtual void setVisible(bool bShow){}
|
|
|
|
protected:
|
|
IClientUserItem* m_pUserItem;
|
|
tagUserAddr m_UserLocation;
|
|
bool m_isAllowLeave; // 是否允许离开(私人场结束主动断连不清空);
|
|
}; |