4#include <nlohmann/json.hpp>
28 const nlohmann::json &data) {
30 bullet.
damage = data.value(
"damage", 10.0f);
void bulletFromJson(rtk::ecs::Registry ®, std::size_t entity, const nlohmann::json &data)
Adds a Bullet to an entity from its blueprint data.
Definition Bullet.hpp:27
Marks an entity as a projectile.
Definition Bullet.hpp:17
float damage
Damage dealt on hit.
Definition Bullet.hpp:18