killing tiles

This commit is contained in:
2026-04-06 22:56:59 +02:00
parent 5c40b9bbf9
commit 6be93da929
4 changed files with 31 additions and 4 deletions

View File

@@ -11,7 +11,8 @@ class TileCollider {
WALL = 1,
PASSABLE = 2,
SLOPE_L = 3,
SLOPE_R = 4
SLOPE_R = 4,
KILL = 5
};
struct FloorHit {
@@ -45,9 +46,11 @@ class TileCollider {
[[nodiscard]] auto checkSlopeBelow(float x, float foot_y, float w) const -> SlopeInfo;
// Devuelve true si el jugador está parcialmente dentro de algún tile de slope
// (algún pie está por debajo de la superficie de un slope que solapa)
[[nodiscard]] auto isInsideAnySlope(float x, float foot_y, float w) const -> bool;
// Devuelve true si el rectángulo del jugador solapa algún tile KILL
[[nodiscard]] auto touchesKillTile(float x, float y, float w, float h) const -> bool;
private:
static constexpr int TS = ::Tile::SIZE;
static constexpr int MW = ::Map::WIDTH;