Mario: prepartations for multiple moving objects

This commit is contained in:
2021-08-05 00:32:17 +02:00
parent 37f7bab63e
commit bfe658618e
19 changed files with 321 additions and 249 deletions
+3 -4
View File
@@ -2,7 +2,6 @@
#define MARIO_H
#include "../sdlpp/sdlpp_rectrenderer.hpp"
#include "mario_visitor.hpp"
#include "sprites.hpp"
#include "blocks.hpp"
@@ -13,10 +12,10 @@ public:
void walkLeft();
void walkRight();
void setStanding();
void handleVisitor( MarioVisitor &visitor );
void handleVisitor( SDLPP::Visitor &visitor ) override;
void jump();
void stopJump();
virtual void custom_move( int ticks ) override;
void custom_move( int ticks ) override;
void visit( SDLPP::Visitor &visitor ) override;
private:
@@ -35,7 +34,7 @@ private:
const double gravity_add_jumping = jump_movement / 32.0;
const double gravity_add_falling = jump_movement / ( 64.0 / 7.0 );
std::shared_ptr< SDLPP::RectColider > top_collision = nullptr;
virtual void setWorldTypeSrc( LandType::Value world ) override;
void setWorldTypeSrc( LandType::Value world ) override;
};
#endif