refactor(entities): rename notifyTileEntered → notifyTilePainted i escolta tile_painted
This commit is contained in:
1 parent
0f56ce7567
commit
e3cf2eb773
7 files changed
+33
-28
No files matched your search
@@ -17,9 +17,9 @@ class Player;
|
||||
// 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. `notifyPlayerEnteredTile(col, row)` — fan-out del hook per a tots
|
||||
// 4. `notifyPlayerTilePainted(col, row)` — fan-out del hook per a tots
|
||||
// els sarcòfags (i qualsevol entitat futura que s'hi subscrigui via
|
||||
// `notifyTileEntered`).
|
||||
// `notifyTilePainted`).
|
||||
//
|
||||
// NO és un singleton: es crea una instància per nivell. De moment no
|
||||
// s'usa encara al GameScene (andamiatge pur).
|
||||
@@ -74,10 +74,11 @@ class EntityManager {
|
||||
// reflecteixi l'estat del frame actual.
|
||||
void checkPlayerCollisions(const std::vector<Player*>& players);
|
||||
|
||||
// Fan-out del hook de moviment de jugador: per a cada sarcòfag,
|
||||
// cridar notifyTileEntered. Les entitats no-sarcòfag ho ignoren per
|
||||
// defecte (veure Entity::notifyTileEntered).
|
||||
void notifyPlayerEnteredTile(int col, int row);
|
||||
// Fan-out del hook de pintat: per a cada sarcòfag, cridar
|
||||
// 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);
|
||||
|
||||
// Carrega els spawns d'un YAML de nivell i els afegeix al manager:
|
||||
// 1. Llegeix el bloc `entities:` via EntityLoader.
|
||||
|
||||
Reference in new issue
Block a user