polimorfise d'enemics

moving platforms
This commit is contained in:
2026-04-08 14:09:28 +02:00
parent 5e02854e7a
commit 73a520bf3c
20 changed files with 632 additions and 106 deletions

View File

@@ -72,6 +72,9 @@ class Player {
void setAdjacentRoom(std::shared_ptr<Room> room, Room::Border direction);
void clearAdjacentRoom();
[[nodiscard]] auto isAlive() const -> bool { return is_alive_; }
[[nodiscard]] auto getVY() const -> float { return vy_; }
void applyPlatformDisplacement(float dx, float surface_y);
void clearPlatformFlag() { on_platform_ = false; }
void setPaused(bool value) { is_paused_ = value; }
void setIgnoreInput(bool value) { ignore_input_ = value; }
[[nodiscard]] auto getIgnoreInput() const -> bool { return ignore_input_; }
@@ -126,6 +129,7 @@ class Player {
bool is_alive_ = true;
bool is_paused_ = false;
bool ignore_input_ = false;
bool on_platform_ = false;
bool turning_ = false;
Direction facing_ = Direction::RIGHT;
Room::Border border_ = Room::Border::TOP;