| 1409 | } |
| 1410 | |
| 1411 | Maybe<Vec2F> WorldEntityCallbacks::entityHealth(World* world, EntityId entityId) { |
| 1412 | if (auto entity = world->get<DamageBarEntity>(entityId)) { |
| 1413 | return Vec2F(entity->health(), entity->maxHealth()); |
| 1414 | } else { |
| 1415 | return {}; |
| 1416 | } |
| 1417 | } |
| 1418 | |
| 1419 | Maybe<String> WorldEntityCallbacks::entitySpecies(World* world, EntityId entityId) { |
| 1420 | if (auto player = world->get<Player>(entityId)) { |