#pragma once

#include <frostbite2D/types/type_alias.h>
#include <vector>

namespace frostbite2D {

class Scene;

class SceneManager {
public:
  static SceneManager& get();

  SceneManager(const SceneManager&) = delete;
  SceneManager& operator=(const SceneManager&) = delete;

  void PushScene(Ptr<Scene> scene);
  void PopScene();
  void ReplaceScene(Ptr<Scene> scene);
  void ClearAll();

  void Update(float deltaTime);
  void Render();

  Scene* GetCurrentScene() const;
  bool HasActiveScene() const;

private:
  SceneManager() = default;
  // ~SceneManager() 在 shutdown() 中手动调用销毁

  std::vector<Ptr<Scene>> sceneStack_;
};

}

