forked from jaildesigner-jailgames/jaildoctors_dilemma
mogut options.section a SceneManager
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "game/scene_manager.hpp" // Para SceneManager
|
||||
|
||||
#include "game/scenes/logo.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
@@ -30,7 +32,7 @@ Logo::Logo()
|
||||
}
|
||||
|
||||
// Inicializa variables
|
||||
Options::section.section = Options::Scene::LOGO;
|
||||
SceneManager::current = SceneManager::Scene::LOGO;
|
||||
|
||||
// Inicializa el vector de colores
|
||||
const std::vector<Uint8> COLORS = {
|
||||
@@ -206,7 +208,7 @@ void Logo::render() {
|
||||
|
||||
// Bucle para el logo del juego
|
||||
void Logo::run() {
|
||||
while (Options::section.section == Options::Scene::LOGO) {
|
||||
while (SceneManager::current == SceneManager::Scene::LOGO) {
|
||||
update();
|
||||
checkEvents();
|
||||
render();
|
||||
@@ -215,11 +217,11 @@ void Logo::run() {
|
||||
|
||||
// Termina la sección
|
||||
void Logo::endSection() {
|
||||
if (Options::section.subsection == Options::SceneOptions::LOGO_TO_TITLE) {
|
||||
Options::section.section = Options::Scene::TITLE;
|
||||
if (SceneManager::options == SceneManager::Options::LOGO_TO_TITLE) {
|
||||
SceneManager::current = SceneManager::Scene::TITLE;
|
||||
}
|
||||
|
||||
else if (Options::section.subsection == Options::SceneOptions::LOGO_TO_INTRO) {
|
||||
Options::section.section = Options::Scene::LOADING_SCREEN;
|
||||
else if (SceneManager::options == SceneManager::Options::LOGO_TO_INTRO) {
|
||||
SceneManager::current = SceneManager::Scene::LOADING_SCREEN;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user