-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameMessageModule.hh
45 lines (35 loc) · 1.31 KB
/
GameMessageModule.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "AbstractMessageListener.hh"
#include "Uuid.hh"
#include <core_utils/CoreObject.hh>
#include <optional>
#include "ConnectionMessage.hh"
#include "DatabaseEntityMapper.hh"
#include "DockMessage.hh"
#include "EntityRemovedMessage.hh"
#include "HangarMessage.hh"
#include "JumpMessage.hh"
#include "LoginMessage.hh"
#include "LogoutMessage.hh"
#include "SignupMessage.hh"
namespace pge {
class Game;
class GameMessageModule : public bsgo::AbstractMessageListener, public utils::CoreObject
{
public:
GameMessageModule(Game &game, const bsgo::DatabaseEntityMapper &entityMapper);
~GameMessageModule() override = default;
void onMessageReceived(const bsgo::IMessage &message) override;
private:
Game &m_game;
const bsgo::DatabaseEntityMapper &m_entityMapper;
void handleConnectionMessage(const bsgo::ConnectionMessage &message);
void handleDockMessage(const bsgo::DockMessage &message);
void handleHangarMessage(const bsgo::HangarMessage &message);
void handleJumpMessage(const bsgo::JumpMessage &message);
void handleLoginMessage(const bsgo::LoginMessage &message);
void handleLogoutMessage(const bsgo::LogoutMessage &message);
void handleSignupMessage(const bsgo::SignupMessage &message);
void handleEntityRemovedMessage(const bsgo::EntityRemovedMessage &message);
};
} // namespace pge