This commit is contained in:
aozhiwei 2023-06-05 22:14:35 +08:00
parent 749e0f19cb
commit c22f7b1c7d
2 changed files with 34 additions and 4 deletions

View File

@ -6,3 +6,23 @@ void Player::Update()
{ {
} }
void Player::Init()
{
}
void Player::CoNet(f8::Coroutine* co)
{
}
void Player::CoLogin(f8::Coroutine* co)
{
}
void Player::CoGame(f8::Coroutine* co)
{
}

View File

@ -6,24 +6,34 @@ namespace a8
} }
A8_DECLARE_ENUM(PlayerState_e, A8_DECLARE_ENUM(PlayerState_e,
INIT = 0, Init = 0,
ConnectNet,
Login,
Game
); );
class Player class Player
{ {
public: public:
void Update(); void Update();
void Init();
template <typename T> template <typename T>
void SendNotifyMsg(T& msg) void SendNotifyMsg(T& msg)
{ {
} }
int GetSocketId() { return socket_id_; } int GetSocketId() { return socket_id_; }
private: private:
void CoNet(f8::Coroutine* co);
void CoLogin(f8::Coroutine* co);
void CoGame(f8::Coroutine* co);
private:
int socket_id_ = 0; int socket_id_ = 0;
PlayerState_e state_ = PlayerState_e::INIT; PlayerState_e state_ = PlayerState_e::Init;
std::string account_id_; std::string account_id_;
std::string session_id_; std::string session_id_;
std::string remote_ip_; std::string remote_ip_;