Mario: teleport to hardcoded level

This commit is contained in:
2022-11-13 19:52:39 +01:00
parent 41ba43ed93
commit c5283000c7
14 changed files with 171 additions and 54 deletions
+4
View File
@@ -32,10 +32,12 @@ public:
virtual void handleVisitor(SDLPP::Visitor &visitor) {}
bool hasCoin();
bool hasMushroom();
bool hasTeleport();
void removeCoin();
void removeMushroom();
void addMushroom();
void setCoinCount(int coins);
void setTeleportLevel(const std::string &level);
void setDestructible(bool destructible = true);
void ensureCollision();
bool isBouncing() const;
@@ -44,6 +46,7 @@ public:
void checkVisibility(double rightmost_x);
bool wasVisible() const;
void harden();
const std::string &getTeleportLevel();
protected:
double bounce_speed = 0.5;
@@ -82,6 +85,7 @@ private:
bool _traveling = false;
int _coins = 0;
bool _mushroom = false;
std::string _teleport_level = "";
bool _release_coin = false;
int ticks_to_bounce = 0;
SDLPP::Vec2D<double> og_pos = {};