killing tiles
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user