mogut options.section a SceneManager
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "game/scene_manager.hpp" // Para SceneManager
|
||||
|
||||
#include "game/scenes/ending.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
@@ -23,8 +25,8 @@ Ending::Ending()
|
||||
cover_counter_(0),
|
||||
ticks_(0),
|
||||
current_scene_(0) {
|
||||
Options::section.section = Options::Scene::ENDING;
|
||||
Options::section.subsection = Options::SceneOptions::NONE;
|
||||
SceneManager::current = SceneManager::Scene::ENDING;
|
||||
SceneManager::options = SceneManager::Options::NONE;
|
||||
|
||||
// Inicializa los textos
|
||||
iniTexts();
|
||||
@@ -359,7 +361,7 @@ void Ending::iniScenes() {
|
||||
void Ending::run() {
|
||||
JA_PlayMusic(Resource::get()->getMusic("ending1.ogg"));
|
||||
|
||||
while (Options::section.section == Options::Scene::ENDING) {
|
||||
while (SceneManager::current == SceneManager::Scene::ENDING) {
|
||||
update();
|
||||
checkEvents();
|
||||
render();
|
||||
@@ -423,7 +425,7 @@ void Ending::checkChangeScene() {
|
||||
cover_counter_ = 0;
|
||||
if (current_scene_ == 5) {
|
||||
// Termina el bucle
|
||||
Options::section.section = Options::Scene::ENDING2;
|
||||
SceneManager::current = SceneManager::Scene::ENDING2;
|
||||
|
||||
// Mantiene los valores anteriores
|
||||
current_scene_ = 4;
|
||||
|
||||
Reference in New Issue
Block a user