Mario: add mushroom block

This commit is contained in:
2021-08-07 21:41:15 +02:00
parent a7aa86c8e3
commit 7b2adac922
9 changed files with 188 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#ifndef MUSHROOM_BLOCK_HPP
#define MUSHROOM_BLOCK_HPP
#include "../blocks.hpp"
class MushroomBlock : public MarioBlock {
public:
MushroomBlock( int x, int y, std::shared_ptr< SDLPP::Renderer > &renderer );
void custom_move(int ticks) override;
void setParent(MarioBlock *parent);
void handleVisitor(SDLPP::Visitor &visitor) override;
private:
MarioBlock *_parent = nullptr;
bool _started_movement = false;
};
#endif