Started to set things up so that the boss fight UI can load enemies and configs out of the components setup.
This commit is contained in:
parent
033358749f
commit
b3b8cbbeee
5 changed files with 14 additions and 15 deletions
|
@ -3,14 +3,6 @@
|
|||
#include "easings.hpp"
|
||||
|
||||
namespace components {
|
||||
ENROLL_COMPONENT(Position, location.x, location.y);
|
||||
ENROLL_COMPONENT(EnemyConfig, hearing_distance);
|
||||
ENROLL_COMPONENT(Motion, dx, dy, random);
|
||||
ENROLL_COMPONENT(Combat, hp, max_hp, damage, dead);
|
||||
ENROLL_COMPONENT(Device, config, events);
|
||||
ENROLL_COMPONENT(Animation, scale, simple, frames, speed, easing, ease_rate);
|
||||
ENROLL_COMPONENT(Sound, attack, death);
|
||||
|
||||
void configure_entity(const ComponentMap& component_map, DinkyECS::World& world, DinkyECS::Entity ent, json& data) {
|
||||
for (auto &i : data) {
|
||||
dbc::check(i.contains("_type") && i["_type"].is_string(), fmt::format("component has no _type: {}", data.dump()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue