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
|
@ -2,21 +2,16 @@
|
|||
|
||||
namespace guecs {
|
||||
|
||||
Clickable make_action(DinkyECS::World& target, Events::GUI event) {
|
||||
return {[&, event](auto ent, auto data){
|
||||
// BUG: I think entityt here shifted and isn't part of the world anymore
|
||||
// BUG: it's actually coming from the GUI so passing it here is wrong
|
||||
// remember that ent is passed in from the UI::mouse handler
|
||||
target.send<Events::GUI>(event, ent, data);
|
||||
Clickable make_action(GameLevel& target, Events::GUI event) {
|
||||
return {[&, event](auto gui_id, auto data){
|
||||
// BUG: either get rid of gui_id or also send a reference the the $gui that is sending the event
|
||||
target.world->send<Events::GUI>(event, gui_id, data);
|
||||
}};
|
||||
}
|
||||
|
||||
Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data) {
|
||||
return {[&, event, data](auto ent, auto){
|
||||
// BUG: I think entityt here shifted and isn't part of the world anymore
|
||||
// BUG: it's actually coming from the GUI so passing it here is wrong
|
||||
// remember that ent is passed in from the UI::mouse handler
|
||||
target.send<Events::GUI>(event, ent, data);
|
||||
Clickable make_action(GameLevel& target, Events::GUI event, std::any data) {
|
||||
return {[&, event, data](auto gui_id, auto){
|
||||
target.world->send<Events::GUI>(event, gui_id, data);
|
||||
}};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue