Mario: simple jump

This commit is contained in:
2021-05-22 23:54:01 +02:00
parent d9a88f2de2
commit 930875ccf8
3 changed files with 47 additions and 3 deletions
+9
View File
@@ -11,10 +11,19 @@ public:
void walkRight();
void setStanding();
void handleVisitor(MarioVisitor &visitor, SDLPP::Vec2D<double> previous_position);
void jump();
void stopJump();
private:
bool faces_right = true;
double side_movement = 0.8;
double fall_movement = 1;
double jump_movement = 1.5;
bool jumping = false;
bool stop_jump = false;
double max_jump = 0;
double min_jump = 0;
double slow_jump = 0;
bool on_ground = true;
};
#endif