feat(player): mort i respawn (DYING + death_spinning + lives counter)

This commit is contained in:
JailDesigner committed 2026-04-29 11:40:05 +02:00
1 parent 6397f9d4eb
commit 9f0a566ffb
11 files changed
+377 -7

No files matched your search

+7
View File
@@ -69,6 +69,7 @@ class Mummy : public DynamicHazard {
[[nodiscard]] auto getState() const -> State { return state_; }
[[nodiscard]] auto isWhippable() const -> bool { return whippable_; }
[[nodiscard]] auto getHurtRemainingS() const -> float { return hurt_remaining_s_; }
[[nodiscard]] auto killsOutright() const -> bool { return kills_outright_; }
private:
// Caixa de col·lisió candidata si l'entitat es desplaçara (dx, dy).
@@ -146,4 +147,10 @@ class Mummy : public DynamicHazard {
bool whippable_{true};
float hurt_remaining_s_{0.0F};
float hurt_speed_{0.0F};
// Si true, el contacte amb el jugador dispara `Player::enterDying`
// (mort d'un sol toc, bypass del flux `hurt`/knockback). Llegit del
// bloc `stats.kills_outright` del YAML; default true per coherència
// amb el comportament d'Oh Mummy! (les mòmies maten).
bool kills_outright_{true};
};