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:
parent
2458f01ebd
commit
2aa4f0a2e8
13 changed files with 78 additions and 43 deletions
|
@ -567,6 +567,14 @@ namespace gui {
|
|||
case eGUI::INV_SELECT:
|
||||
event(Event::INV_SELECT, data);
|
||||
break;
|
||||
case eGUI::AIM_CLICK:
|
||||
if(auto aimed_at = $main_ui.camera_aim()) {
|
||||
dbc::log("clicked on a thing");
|
||||
System::pickup($level, aimed_at);
|
||||
} else {
|
||||
dbc::log("there's no thing there!");
|
||||
}
|
||||
break;
|
||||
case eGUI::LOOT: {
|
||||
if(world.has<components::InventoryItem>(entity)) {
|
||||
auto gui_id = $loot_ui.$gui.entity("item_0");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue