29 lines
626 B
C++
29 lines
626 B
C++
#pragma once
|
|
|
|
#include <motor/sound/sound.hpp>
|
|
#include <motor/basic/texture_label.hpp>
|
|
|
|
#include <lib/libwebsockets.h>
|
|
|
|
#include "../Base.hpp"
|
|
#include "../input.hpp"
|
|
|
|
|
|
namespace games {
|
|
struct Client : public Base {
|
|
static constexpr char bundle_name[] = "client";
|
|
libwebsocket_context * context{nullptr};
|
|
libwebsocket * wsi{nullptr};
|
|
float poll_time{0.0};
|
|
|
|
Client(int window_width, int window_height, std::shared_ptr<Base>& active_base);
|
|
|
|
virtual bool has_ended();
|
|
virtual void update(float const dt, Input input);
|
|
virtual void draw();
|
|
|
|
void handle_input(float const dt, Input input);
|
|
|
|
~Client();
|
|
};
|
|
}
|