Mario: custom mario class
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#ifndef MARIO_H
|
||||
#define MARIO_H
|
||||
|
||||
#include "../sdlpp/sdlpp_rectrenderer.hpp"
|
||||
#include "mario_visitor.hpp"
|
||||
|
||||
class Mario : public SDLPP::RectangleRender {
|
||||
public:
|
||||
Mario(const std::shared_ptr< SDLPP::Renderer > &renderer);
|
||||
void walkLeft();
|
||||
void walkRight();
|
||||
void setStanding();
|
||||
void handleVisitor(MarioVisitor &visitor, SDLPP::Vec2D<double> previous_position);
|
||||
private:
|
||||
bool faces_right = true;
|
||||
double side_movement = 0.8;
|
||||
double fall_movement = 1;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user