This commit is contained in:
2026-04-07 13:54:50 +02:00
parent 60a074167f
commit 53ee497509
4 changed files with 119 additions and 186 deletions

View File

@@ -63,7 +63,7 @@ class Player {
void update(float delta_time);
[[nodiscard]] auto isOnBorder() const -> bool { return border_ != Room::Border::NONE; }
[[nodiscard]] auto getBorder() const -> Room::Border { return border_; }
void commitToRoom(Room::Border border);
void switchBorders();
auto getRect() -> SDL_FRect { return {.x = x_, .y = y_, .w = WIDTH, .h = HEIGHT}; }
auto getCollider() -> SDL_FRect& { return collider_box_; }
auto getSpawnParams() -> SpawnData { return {.x = x_, .y = y_, .vx = vx_, .vy = vy_, .last_grounded_position = last_grounded_position_, .state = state_, .flip = sprite_->getFlip()}; }
@@ -73,7 +73,6 @@ class Player {
void setRoom(std::shared_ptr<Room> room) { room_ = std::move(room); }
void setAdjacentRoom(std::shared_ptr<Room> room, Room::Border direction);
void clearAdjacentRoom();
[[nodiscard]] auto isFullyOutOfBounds() const -> bool;
[[nodiscard]] auto isAlive() const -> bool { return is_alive_; }
void setPaused(bool value) { is_paused_ = value; }
void setIgnoreInput(bool value) { ignore_input_ = value; }