Show a combat icon when in combat.
This commit is contained in:
parent
dc9f942912
commit
e4d6bf4854
3 changed files with 11 additions and 5 deletions
|
|
@ -31,6 +31,11 @@
|
||||||
"hp_status_00": "assets/sounds/hp_status_00.ogg"
|
"hp_status_00": "assets/sounds/hp_status_00.ogg"
|
||||||
},
|
},
|
||||||
"sprites": {
|
"sprites": {
|
||||||
|
"combat_active":
|
||||||
|
{"path": "assets/sprites/combat_active.png",
|
||||||
|
"frame_width": 170,
|
||||||
|
"frame_height": 170
|
||||||
|
},
|
||||||
"burning_animation":
|
"burning_animation":
|
||||||
{"path": "assets/sprites/burning_animation.png",
|
{"path": "assets/sprites/burning_animation.png",
|
||||||
"frame_width": 256,
|
"frame_width": 256,
|
||||||
|
|
|
||||||
BIN
assets/sprites/combat_active.png
Normal file
BIN
assets/sprites/combat_active.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
|
|
@ -414,17 +414,18 @@ namespace gui {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eGUI::COMBAT_START:
|
case eGUI::COMBAT_START:
|
||||||
// TODO: $main_ui.show_combat();
|
$main_ui.show_combat();
|
||||||
|
break;
|
||||||
|
case eGUI::COMBAT_STOP: // BUG: should these combine?
|
||||||
|
case eGUI::NO_NEIGHBORS:
|
||||||
|
$main_ui.close_combat();
|
||||||
break;
|
break;
|
||||||
case eGUI::ENTITY_SPAWN: {
|
case eGUI::ENTITY_SPAWN: {
|
||||||
auto& sprite = world->get<components::Sprite>(entity);
|
auto& sprite = world->get<components::Sprite>(entity);
|
||||||
$main_ui.$rayview->update_sprite(entity, sprite);
|
$main_ui.$rayview->update_sprite(entity, sprite);
|
||||||
$main_ui.dirty();
|
$main_ui.dirty();
|
||||||
run_systems();
|
run_systems();
|
||||||
} break;
|
} break;
|
||||||
case eGUI::NO_NEIGHBORS:
|
|
||||||
event(Event::COMBAT_STOP);
|
|
||||||
break;
|
|
||||||
case eGUI::LOOT_CLOSE:
|
case eGUI::LOOT_CLOSE:
|
||||||
// BUG: need to resolve GUI events vs. FSM events better
|
// BUG: need to resolve GUI events vs. FSM events better
|
||||||
event(Event::LOOT_OPEN);
|
event(Event::LOOT_OPEN);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue