5 #include <Framework/IScene.h>
16 static std::vector<std::shared_ptr<IScene>>& Single()
18 static std::vector<std::shared_ptr<IScene>> instance;
25 auto it = Single().begin();
27 while (it != Single().end())
31 it = Single().erase(it);
32 if (Single().size() == 0){
break; }
47 if (Single().size() == 0){
break; }
48 Single().back()->Update();
49 if (
IsDraw()){ Single().back()->Draw(); }
60 static void AddScene(std::shared_ptr<IScene> 追加するシーン)
65 auto it = Single().begin();
66 while (it != Single().end())
77 Single().push_back(追加するシーン);
82 static std::shared_ptr<IScene>
GetScene(
int インデックス)
84 return Single()[Single().size() - インデックス - 1];
91 int no = Single().size() - インデックス - 1;
92 if (no < 0) {
return false; }
102 static bool isDraw =
true;
static bool Update(bool 描画更新フラグ=true)
各種更新処理をまとめて行う.
Definition: System.h:111
static void Run()
実行開始.
Definition: Director.h:41
static std::shared_ptr< IScene > GetScene(int インデックス)
上からインデックス番目のシーンを取得.
Definition: Director.h:82
static void CheckFPS()
FPS計測を更新.
Definition: Time.h:75
シーンを管理するクラス.
Definition: Director.h:11
static void ResetFPS()
FPSの計測開始.
Definition: Time.h:69
static bool & IsDraw()
描画更新フラグを設定.
Definition: Director.h:100
static bool ActiveScene(int インデックス)
上からインデックス番目のシーンをアクティブにする.
Definition: Director.h:89
static void AddScene(std::shared_ptr< IScene > 追加するシーン)
Sceneを追加しスタックに積む.
Definition: Director.h:60