diff --git a/server/robotserver/player.cc b/server/robotserver/player.cc index 48d7f8ac..828b678a 100644 --- a/server/robotserver/player.cc +++ b/server/robotserver/player.cc @@ -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) +{ + +} diff --git a/server/robotserver/player.h b/server/robotserver/player.h index 0b96fbd5..eaca0da4 100644 --- a/server/robotserver/player.h +++ b/server/robotserver/player.h @@ -6,24 +6,34 @@ namespace a8 } A8_DECLARE_ENUM(PlayerState_e, - INIT = 0, + Init = 0, + ConnectNet, + Login, + Game ); class Player { - public: +public: void Update(); + void Init(); template void SendNotifyMsg(T& msg) { } 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; - PlayerState_e state_ = PlayerState_e::INIT; + PlayerState_e state_ = PlayerState_e::Init; std::string account_id_; std::string session_id_; std::string remote_ip_;