afegit mode autoplay en debug
This commit is contained in:
@@ -230,6 +230,8 @@ void Director::loadDebugConfig() {
|
||||
out << "initial_stage: 0\n";
|
||||
out << "show_render_info: true\n";
|
||||
out << "resource_loading: preload\n";
|
||||
out << "autoplay: false\n";
|
||||
out << "invincibility: false\n";
|
||||
out.close();
|
||||
}
|
||||
// Usar defaults de DebugConfig
|
||||
@@ -263,6 +265,16 @@ void Director::loadDebugConfig() {
|
||||
debug_config.resource_loading = yaml["resource_loading"].get_value<std::string>();
|
||||
} catch (...) {}
|
||||
}
|
||||
if (yaml.contains("autoplay")) {
|
||||
try {
|
||||
debug_config.autoplay = yaml["autoplay"].get_value<bool>();
|
||||
} catch (...) {}
|
||||
}
|
||||
if (yaml.contains("invincibility")) {
|
||||
try {
|
||||
debug_config.invincibility = yaml["invincibility"].get_value<bool>();
|
||||
} catch (...) {}
|
||||
}
|
||||
} catch (...) {
|
||||
std::cout << "Error parsing debug.yaml, using defaults" << '\n';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ class Director {
|
||||
int initial_stage = 0;
|
||||
bool show_render_info = true;
|
||||
std::string resource_loading;
|
||||
bool autoplay = false;
|
||||
bool invincibility = false;
|
||||
|
||||
DebugConfig()
|
||||
: initial_section("game"),
|
||||
|
||||
Reference in New Issue
Block a user