feat(entities): migrar bullet a data/entities/bullet/bullet.yaml

This commit is contained in:
2026-05-25 11:42:43 +02:00
parent 5fb6c68df4
commit bea844d51e
12 changed files with 306 additions and 107 deletions
+26
View File
@@ -0,0 +1,26 @@
// bullet_registry.hpp - Registre estàtic de la configuració de la bala
// © 2026 JailDesigner
//
// Una única instància per a tota la sessió. Es manté el patró registry
// (paral·lel a EnemyRegistry) tot i ser una sola entitat: si el dia de demà
// hi ha més tipus de bala (laser/plasma/etc.) només cal estendre-ho.
#pragma once
#include "game/entities/bullet_config.hpp"
class BulletRegistry {
public:
BulletRegistry() = delete;
// Carrega data/entities/bullet/bullet.yaml. Retorna false si falla.
static auto load() -> bool;
// Accés a la configuració. Avorta amb log fatal si load() no s'ha cridat
// o ha fallat.
static auto get() -> const BulletConfig&;
private:
static BulletConfig config;
static bool loaded;
};