Sprite is now a component we can place on anything to render it.

This commit is contained in:
Zed A. Shaw 2025-02-10 12:58:24 -05:00
parent 9c37960283
commit 6bca6d021e
8 changed files with 50 additions and 26 deletions

View file

@ -11,6 +11,7 @@ namespace components {
ENROLL_COMPONENT(Combat, hp, damage, dead);
ENROLL_COMPONENT(LightSource, strength, radius);
ENROLL_COMPONENT(Device, config, events);
ENROLL_COMPONENT(Sprite, name);
void configure_entity(const ComponentMap& component_map, DinkyECS::World& world, DinkyECS::Entity ent, json& data) {
for (auto &i : data) {
@ -31,5 +32,6 @@ namespace components {
components::enroll<Motion>(component_map);
components::enroll<LightSource>(component_map);
components::enroll<Device>(component_map);
components::enroll<Sprite>(component_map);
}
}