feat(stats): Player com a font de veritat de vides/score/tresors i sarcs amb recompensa

This commit is contained in:
JailDesigner committed 2026-05-12 19:51:42 +02:00
1 parent d186f66c2c
commit f5d251c33b
14 files changed
+226 -34

No files matched your search

+5 -4
View File
@@ -21,9 +21,10 @@ class DynamicHazard;
// 2. `update(dt)` propaga el tick a totes.
// 3. Comptador de sarcòfags oberts — quan iguala el total registrat,
// crida `door_->open()` automàticament.
// 4. `notifyPlayerTilePainted(col, row)` — fan-out del hook per a tots
// els sarcòfags (i qualsevol entitat futura que s'hi subscrigui via
// `notifyTilePainted`).
// 4. `notifyPlayerTilePainted(col, row, player_id)` — fan-out del hook
// per a tots els sarcòfags (i qualsevol entitat futura que s'hi
// subscrigui via `notifyTilePainted`). El `player_id` permet
// atribuir l'acció al jugador concret (p.ex. qui tanca un sarc).
//
// NO és un singleton: es crea una instància per nivell. De moment no
// s'usa encara al GameScene (andamiatge pur).
@@ -103,7 +104,7 @@ class EntityManager {
// notifyTilePainted. Les entitats no-sarcòfag ho ignoren per defecte
// (veure Entity::notifyTilePainted). Invocat com a reacció a
// `tile_painted` al bus (re-publicat pel PaintLayer un cop filtrat).
void notifyPlayerTilePainted(int col, int row);
void notifyPlayerTilePainted(int col, int row, int player_id);
// Carrega els spawns d'un YAML de nivell i els afegeix al manager:
// 1. Llegeix el bloc `entities:` via EntityLoader.