29 lines
491 B
C++
29 lines
491 B
C++
#ifndef HOLESOME_MAP_PLAYER_HPP
|
|
#define HOLESOME_MAP_PLAYER_HPP
|
|
|
|
|
|
#include <box2d/box2d.h>
|
|
#include "../player/player.hpp"
|
|
#include "../../config.h"
|
|
|
|
class MapPlayer
|
|
{
|
|
public:
|
|
Player *player;
|
|
b2Body *body;
|
|
float shapeRadius = 0;
|
|
|
|
MapPlayer(Player *player, b2Body *body) : player(player), body(body)
|
|
{
|
|
updateShape();
|
|
}
|
|
|
|
void updateSimulationPosition();
|
|
|
|
void updatePlayerPosition() const;
|
|
|
|
void updateShape();
|
|
};
|
|
|
|
|
|
#endif //HOLESOME_MAP_PLAYER_HPP
|