Mario: Fireball works
This commit is contained in:
+8
-2
@@ -11,13 +11,18 @@
|
||||
|
||||
class Mario : public MarioBlock {
|
||||
public:
|
||||
Mario(int x, int y, const std::shared_ptr<SDLPP::Renderer> &renderer);
|
||||
Mario(const std::shared_ptr<SDLPP::Renderer> &renderer);
|
||||
Mario(int x, int y, const std::shared_ptr<SDLPP::Renderer> &renderer, std::function<void(std::shared_ptr<MarioBlock>&, bool)> addObject);
|
||||
Mario(const std::shared_ptr<SDLPP::Renderer> &renderer, std::function<void(std::shared_ptr<MarioBlock>&, bool)> addObject);
|
||||
void walkLeft();
|
||||
void walkRight();
|
||||
void setStanding();
|
||||
void handleVisitor(SDLPP::Visitor &visitor) override;
|
||||
void jump();
|
||||
#ifndef EDITOR
|
||||
void fire();
|
||||
void setAddObjFunc(std::function<void(std::shared_ptr<MarioBlock>&, bool)> func);
|
||||
std::function<void(std::shared_ptr<MarioBlock>&, bool)> getAddObjFunc();
|
||||
#endif
|
||||
void stopJump();
|
||||
void custom_move(int ticks) override;
|
||||
void visit(SDLPP::Visitor &visitor) override;
|
||||
@@ -48,6 +53,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::function<void(std::shared_ptr<MarioBlock>&, bool)> _addObject;
|
||||
void setDeath(bool dead = true) {
|
||||
_death = dead;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user