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<guecs::Rectangle>(close, {});
$gui.set<guecs::Label>(close, {L"CLOSE"});
$gui.set<guecs::Clickable>(close,
guecs::make_action(*$level.world, Events::GUI::LOOT_CLOSE));
guecs::make_action($level, Events::GUI::LOOT_CLOSE));
for(int i = 0; i < INV_SLOTS; i++) {
auto id = $gui.entity("item_", i);
@ -38,7 +38,7 @@ namespace gui {
THEME.TRANSPARENT, THEME.LIGHT_MID });
$gui.set<guecs::Effect>(id, {0.4f, "ui_shader"});
$gui.set<guecs::Clickable>(id, {
guecs::make_action(*$level.world, Events::GUI::LOOT_SELECT, {id})
guecs::make_action($level, Events::GUI::LOOT_SELECT, {id})
});
}