- afegides claus i portes al editor

- fix: crear una nova habitació no modificava la memoria, soles els fitxers
This commit is contained in:
2026-04-10 18:34:04 +02:00
parent 077b86ea4a
commit 8ebf7894f2
15 changed files with 633 additions and 17 deletions

View File

@@ -53,6 +53,12 @@ class KeyManager {
*/
auto checkCollision(SDL_FRect& rect) -> bool;
#ifdef _DEBUG
// --- API para el editor (debug) ---
[[nodiscard]] auto getCount() const -> int { return static_cast<int>(keys_.size()); }
auto getKey(int index) -> std::shared_ptr<Key>& { return keys_.at(index); }
#endif
private:
std::vector<std::shared_ptr<Key>> keys_; // Colección de llaves
std::string room_id_; // Identificador de la habitación