holesome/src/game/physics/map/map_player.hpp

31 lines
560 B
C++

#ifndef HOLESOME_MAP_PLAYER_HPP
#define HOLESOME_MAP_PLAYER_HPP
#include <box2d/box2d.h>
#include <utility>
#include "../../player/player.hpp"
#include "../../../config.h"
class MapPlayer
{
public:
std::shared_ptr<Player> player;
b2Body *body;
float shapeRadius = 0;
MapPlayer(std::shared_ptr<Player> player, b2Body *body) : player(std::move(player)), body(body)
{
updateShape();
}
void updateSimulationPosition();
void updatePlayerPosition() const;
void updateShape();
};
#endif //HOLESOME_MAP_PLAYER_HPP