More notes on the next things to do.
This commit is contained in:
parent
011fee4872
commit
0e79288afc
8 changed files with 31 additions and 6 deletions
|
@ -127,6 +127,11 @@ void System::combat(DinkyECS::World &world, Player &player) {
|
|||
}
|
||||
} else if(world.has<Loot>(entity)) {
|
||||
world.send<eGUI>(eGUI::LOOT, entity);
|
||||
auto &loot = world.get<Loot>(entity);
|
||||
auto &loot_pos = world.get<Position>(entity);
|
||||
auto &inventory = world.get<Inventory>(player.entity);
|
||||
inventory.gold += loot.amount;
|
||||
collider.remove(loot_pos.location);
|
||||
} else {
|
||||
println("UNKNOWN COLLISION TYPE {}", entity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue