23#include <kiwano/core/Common.h>
24#include <kiwano/base/Module.h>
25#include <kiwano/core/Time.h>
26#include <kiwano/core/Singleton.h>
27#include <kiwano/event/Event.h>
28#include <kiwano/platform/Runner.h>
29#include <kiwano/platform/Window.h>
30#include <kiwano/utils/Timer.h>
39extern KGE_API
int GetVersion();
61 void Run(
const Settings& settings,
const Function<
void()>& setup, std::initializer_list<Module*> modules = {});
93 bool IsPaused()
const;
121 void SetTimeScale(
float scale_factor);
137 void DispatchEvent(
Event* evt);
145 void PerformInMainThread(
Function<
void()> func);
181 std::mutex perform_mutex_;
182 Queue<
Function<void()>> functions_to_perform_;
193 return runner_->GetWindow();
应用程序,控制游戏的整个生命周期,包括初始化、启动、结束以及事件分发等
Definition: Application.h:46
RefPtr< Window > GetWindow() const
获取窗口
Definition: Application.h:190
RefPtr< Runner > GetRunner() const
获取程序运行器
Definition: Application.h:185
bool IsPaused() const
获取暂停状态
Definition: Application.h:197
Definition: Function.h:228
基础模块
Definition: Module.h:111
引用计数智能指针
Definition: RefBasePtr.hpp:35
Definition: Singleton.h:28
时间段
Definition: Duration.h:48
游戏设置
Definition: Runner.h:39