feat(hazard): nou hazard Hole — caiguda per forat amb clip rect
This commit is contained in:
1 parent
d4593d0686
commit
4da50571eb
17 files changed
+376
-15
No files matched your search
@@ -0,0 +1,18 @@
|
||||
// Stubs de Player per als binaris `test_entities_smoke` i `test_whip_attack`.
|
||||
//
|
||||
// `Hole` referencia `Player::getHitBox()` i `Player::enterHoleFall()` dins
|
||||
// de `onPlayerContact` (camí no exercit pels tests stand-alone). Linkar
|
||||
// `player.cpp` arrossegaria audio/gamepad/input/screen/cache, una explosió
|
||||
// de dependències que els smokes intenten evitar — mateixa decisió que
|
||||
// `whip_attack_player_stubs.cpp`. Aquests stubs proporcionen els símbols
|
||||
// com a no-op perquè T1/T7 puguin fer `factory.create("hole", ...)`.
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include "game/entities/player.hpp"
|
||||
|
||||
auto Player::getHitBox() const -> SDL_FRect {
|
||||
return SDL_FRect{0.0F, 0.0F, 0.0F, 0.0F};
|
||||
}
|
||||
|
||||
void Player::enterHoleFall(float /*center_x*/, float /*center_y*/, float /*floor_y*/) {
|
||||
}
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "game/entities/animation_component.hpp"
|
||||
#include "game/entities/concrete/door.hpp"
|
||||
#include "game/entities/concrete/floor_trap.hpp"
|
||||
#include "game/entities/concrete/hole.hpp"
|
||||
#include "game/entities/concrete/mummy.hpp"
|
||||
#include "game/entities/concrete/rolling_rock.hpp"
|
||||
#include "game/entities/concrete/sarcophagus.hpp"
|
||||
@@ -74,7 +75,7 @@ namespace {
|
||||
|
||||
const std::vector<std::string> TYPES = {
|
||||
"torch", "sarcophagus", "door", "mummy",
|
||||
"rolling_rock", "wall_trap", "floor_trap",
|
||||
"rolling_rock", "wall_trap", "floor_trap", "hole",
|
||||
};
|
||||
for (const auto& type : TYPES) {
|
||||
fkyaml::node tmpl = EntityLoader::loadTemplate(type);
|
||||
@@ -251,7 +252,7 @@ namespace {
|
||||
std::cout << "[T7] plantilles YAML\n";
|
||||
const std::vector<std::string> TYPES = {
|
||||
"torch", "sarcophagus", "door", "mummy",
|
||||
"rolling_rock", "wall_trap", "floor_trap",
|
||||
"rolling_rock", "wall_trap", "floor_trap", "hole",
|
||||
};
|
||||
for (const auto& type : TYPES) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user