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/credits.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
@@ -19,8 +21,8 @@
|
||||
Credits::Credits()
|
||||
: shining_sprite_(std::make_shared<SAnimatedSprite>(Resource::get()->getSurface("shine.gif"), Resource::get()->getAnimations("shine.ani"))) {
|
||||
// Inicializa variables
|
||||
Options::section.section = Options::Scene::CREDITS;
|
||||
Options::section.subsection = Options::SceneOptions::NONE;
|
||||
SceneManager::current = SceneManager::Scene::CREDITS;
|
||||
SceneManager::options = SceneManager::Options::NONE;
|
||||
shining_sprite_->setPos({194, 174, 8, 8});
|
||||
|
||||
// Cambia el color del borde
|
||||
@@ -165,7 +167,7 @@ void Credits::updateCounter() {
|
||||
|
||||
// Comprueba si ha terminado la sección
|
||||
if (counter_ > 1200) {
|
||||
Options::section.section = Options::Scene::DEMO;
|
||||
SceneManager::current = SceneManager::Scene::DEMO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +220,7 @@ void Credits::render() {
|
||||
|
||||
// Bucle para el logo del juego
|
||||
void Credits::run() {
|
||||
while (Options::section.section == Options::Scene::CREDITS) {
|
||||
while (SceneManager::current == SceneManager::Scene::CREDITS) {
|
||||
update();
|
||||
checkEvents();
|
||||
render();
|
||||
|
||||
Reference in New Issue
Block a user