22#include <kiwano/core/Common.h>
23#include <kiwano/core/Time.h>
24#include <kiwano/platform/Window.h>
25#include <kiwano/render/Color.h>
26#include <kiwano/render/Texture.h>
27#include <kiwano/utils/Ticker.h>
74 virtual void OnReady();
79 virtual void OnDestroy();
85 virtual bool OnClose();
113 void SetSettings(
Settings settings);
146 main_window_ = window;
156 settings_ = settings;
161 return frame_ticker_;
166 frame_ticker_ = ticker;
应用程序,控制游戏的整个生命周期,包括初始化、启动、结束以及事件分发等
Definition: Application.h:46
基础对象
Definition: ObjectBase.h:138
引用计数智能指针
Definition: RefBasePtr.hpp:35
程序运行器
Definition: Runner.h:60
virtual void OnDestroy()
应用程序销毁处理
Definition: Runner.h:132
RefPtr< Ticker > GetFrameTicker() const
获取帧报时器
Definition: Runner.h:159
virtual void OnReady()
初始化完成处理
Definition: Runner.h:130
virtual bool OnClose()
应用程序关闭处理
Definition: Runner.h:134
void SetFrameTicker(RefPtr< Ticker > ticker)
设置帧报时器
Definition: Runner.h:164
void SetWindow(RefPtr< Window > window)
设置窗口
Definition: Runner.h:144
Settings GetSettings() const
获取设置
Definition: Runner.h:149
void SetSettings(Settings settings)
修改设置
Definition: Runner.h:154
RefPtr< Window > GetWindow() const
获取窗口
Definition: Runner.h:139
时间段
Definition: Duration.h:48
游戏设置
Definition: Runner.h:39
Duration frame_interval
帧间隔
Definition: Runner.h:42
Color bg_color
背景色
Definition: Runner.h:41
bool vsync_enabled
垂直同步
Definition: Runner.h:43
bool debug_mode
调试模式
Definition: Runner.h:44
WindowConfig window
窗口设置
Definition: Runner.h:40
窗口设置
Definition: Window.h:97