From 870fcdae66edc680cac55defb149e1434e865f37 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 14 Dec 2018 14:55:42 +0800 Subject: =?UTF-8?q?*=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/game/je_application.h | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'src/libjin/game/je_application.h') diff --git a/src/libjin/game/je_application.h b/src/libjin/game/je_application.h index 9de6e1c..6eb8af2 100644 --- a/src/libjin/game/je_application.h +++ b/src/libjin/game/je_application.h @@ -12,19 +12,19 @@ namespace JinEngine { - namespace Game - { + namespace Game + { /// /// Game class. /// - class Application : public Subsystem - { - public: - typedef void(*onLoad)(); - typedef void(*onEvent)(JinEngine::Input::Event* e); - typedef void(*onUpdate)(int dt); - typedef void(*onDraw)(); + class Application : public Subsystem + { + public: + typedef void(*onLoad)(); + typedef void(*onEvent)(JinEngine::Input::Event* e); + typedef void(*onUpdate)(int dt); + typedef void(*onDraw)(); Application(); ~Application() {}; @@ -32,23 +32,23 @@ namespace JinEngine /// /// Game setting. /// - struct Setting : SettingBase - { - onEvent eventHandler; - onUpdate updater; - onDraw drawer; - onLoad loader; - }; + struct Setting : SettingBase + { + onEvent eventHandler; + onUpdate updater; + onDraw drawer; + onLoad loader; + }; /// /// Main game loop. /// - void run(); + void run(); /// /// Stop game. /// - inline void stop() + inline void stop() { _running = false; }; @@ -58,25 +58,25 @@ namespace JinEngine /// /// @return True if game is running, otherwise return false. /// - inline bool running() + inline bool running() { return _running; }; - private: - onEvent _onEvent; - onUpdate _onUpdate; - onDraw _onDraw; - onLoad _onLoad; + private: + onEvent _onEvent; + onUpdate _onUpdate; + onDraw _onDraw; + onLoad _onLoad; - bool _running; + bool _running; - bool startSystem(const SettingBase* setting); - void quitSystem(); + bool startSystem(const SettingBase* setting); + void quitSystem(); - }; + }; - } // namespace Core + } // namespace Core } // namespace JinEngine #endif // jin_game -- cgit v1.1-26-g67d0