Files
Tower-Defense2/src/client/state/LoggingState.cpp
2025-08-22 11:41:58 +02:00

27 lines
651 B
C++

#include <client/state/LoggingState.h>
#include <client/state/LobbyState.h>
namespace td {
namespace client {
LoggingState::LoggingState(Client& a_Client, const std::string& a_PlayerName) : ClientState(a_Client) {
SendPacket(td::protocol::packets::PlayerLoginPacket(a_PlayerName));
}
void LoggingState::Update(float a_Delta) {
}
LoggingState::~LoggingState() {}
void LoggingState::Handle(const protocol::packets::PlayerJoinPacket& a_Packet) {
// TODO: check if id matches client id
}
void LoggingState::Handle(const protocol::packets::LoggingSuccessPacket& a_Packet) {
ChangeState<LobbyState>();
}
} // namespace client
} // namespace td