- es pot canviar d'habitacio amb el editor obert
- nous comandos per a navegar per les habitacions (left, right, up i down)
This commit is contained in:
@@ -133,6 +133,13 @@ Game::Game(Mode mode)
|
||||
GameControl::revert_editor = []() -> std::string {
|
||||
return MapEditor::get()->revert();
|
||||
};
|
||||
GameControl::get_adjacent_room = [this](const std::string& direction) -> std::string {
|
||||
if (direction == "UP") { return room_->getRoom(Room::Border::TOP); }
|
||||
if (direction == "DOWN") { return room_->getRoom(Room::Border::BOTTOM); }
|
||||
if (direction == "LEFT") { return room_->getRoom(Room::Border::LEFT); }
|
||||
if (direction == "RIGHT") { return room_->getRoom(Room::Border::RIGHT); }
|
||||
return "0";
|
||||
};
|
||||
#endif
|
||||
|
||||
SceneManager::current = (mode_ == Mode::GAME) ? SceneManager::Scene::GAME : SceneManager::Scene::DEMO;
|
||||
@@ -158,6 +165,7 @@ Game::~Game() {
|
||||
GameControl::exit_editor = nullptr;
|
||||
GameControl::revert_editor = nullptr;
|
||||
GameControl::reload_current_room = nullptr;
|
||||
GameControl::get_adjacent_room = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user