GPR5100 - Rollback
Loading...
Searching...
No Matches
client_app.h
1#pragma once
2#include "network/network_client.h"
3#include "engine/app.h"
4
5namespace game
6{
10class ClientApp final : public core::App
11{
12public:
13 void Begin() override;
14
15 void Update(sf::Time dt) override;
16
17 void End() override;
18
19 void DrawImGui() override;
20
21 void OnEvent(const sf::Event& event) override;
22
23 void Draw(sf::RenderTarget& window) override
24 {
25 client_.Draw(window);
26 }
27
28private:
29 sf::Vector2u windowSize_;
30 NetworkClient client_;
31};
32} // namespace game
App is an interface for applications that need to init/update/destroy, draw and get event from OS.
Definition: app.h:12
ClientApp is a App that owns a NetworkClient and shows it on the screen directly.
Definition: client_app.h:11
NetworkClient is a network client that uses SFML sockets.
Definition: network_client.h:16