1
This commit is contained in:
parent
885f021b24
commit
e369305fbe
@ -12,6 +12,11 @@ void PlayerMgr::UnInit()
|
||||
{
|
||||
}
|
||||
|
||||
int PlayerMgr::GetPlayerNum()
|
||||
{
|
||||
return socket_hash_.size();
|
||||
}
|
||||
|
||||
Player* PlayerMgr::GetPlayerBySocket(int socket)
|
||||
{
|
||||
auto itr = socket_hash_.find(socket);
|
||||
|
@ -19,6 +19,7 @@ class PlayerMgr : public a8::Singleton<PlayerMgr>
|
||||
void Init();
|
||||
void UnInit();
|
||||
|
||||
int GetPlayerNum();
|
||||
Player* GetPlayerBySocket(int socket);
|
||||
Player* CreatePlayerByCMJoin(int socket, const cs::CMJoin& msg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user