feat(entities): migrar bullet a data/entities/bullet/bullet.yaml
This commit is contained in:
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user