Mario: add Goomba

This commit is contained in:
2021-08-08 21:45:05 +02:00
parent e31c4bb2db
commit edeeadb232
8 changed files with 231 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#ifndef GOOMBA_BLOCK_HPP
#define GOOMBA_BLOCK_HPP
#include "../blocks.hpp"
class GoombaBlock : public MarioBlock {
public:
GoombaBlock( int x, int y, std::shared_ptr< SDLPP::Renderer > &renderer );
void custom_move(int ticks) override;
void move(int ticks) override;
void handleVisitor(SDLPP::Visitor &visitor) override;
private:
void startDeath();
int death_countdown = 100;
bool death_started = false;
};
#endif