Finally can pick things up, but it's really bad so far. Need a bunch of refactoring in how the collision system works, and make it so collision and maps can have multiple entities in the same square.

This commit is contained in:
Zed A. Shaw 2025-06-12 13:06:36 -04:00
parent 2458f01ebd
commit 2aa4f0a2e8
13 changed files with 78 additions and 43 deletions

View file

@ -30,7 +30,7 @@ namespace gui {
$gui.set<Sound>(button, {sound});
$gui.set<Effect>(button, {.duration=0.5f, .name=effect_name});
$gui.set<Clickable>(button,
guecs::make_action(*$level.world, event, {action}));
guecs::make_action($level, event, {action}));
return button;
}
@ -66,7 +66,7 @@ namespace gui {
auto hp_gauge = $gui.entity("hp_gauge");
$gui.set<Sprite>(hp_gauge, {"stone_doll_cursed"});
$gui.set<Clickable>(hp_gauge,
guecs::make_action(*$level.world, Events::GUI::HP_STATUS, {}));
guecs::make_action($level, Events::GUI::HP_STATUS, {}));
$gui.init();
}