Made a curative component really quick.
This commit is contained in:
parent
d6916b675e
commit
ee304c30e3
3 changed files with 24 additions and 0 deletions
|
@ -165,6 +165,12 @@ void System::collision(DinkyECS::World &world, Player &player) {
|
|||
world.remove<Loot>(entity);
|
||||
}
|
||||
|
||||
if(world.has<Curative>(entity)) {
|
||||
auto& cure = world.get<Curative>(entity);
|
||||
player_combat.hp += cure.hp;
|
||||
world.remove<Curative>(entity);
|
||||
}
|
||||
|
||||
collider.remove(item_pos.location);
|
||||
world.remove<Tile>(entity);
|
||||
world.remove<InventoryItem>(entity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue