#pragma once #include "math/vec3.h" namespace BettolaLib { namespace Network { struct PlayerInputMessage; } } class Player { public: struct InputState { bool up =false; bool down =false; bool left =false; bool right =false; }; Player(void); void update(double dt); void set_position(float x, float y); void apply_input(const BettolaLib::Network::PlayerInputMessage& input); void set_velocity_direction(const InputState& input, const BettolaMath::Vec3& cam_front); float get_x() const { return _x; } float get_y() const { return _y; } float get_width() const { return _width; } float get_height() const { return _height; } private: float _x; float _y; float _width; float _height; float _vx; float _vy; float _speed; };