diff options
author | chai <chaifix@163.com> | 2018-07-28 20:53:17 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-28 20:53:17 +0800 |
commit | 714b68bf2e6e3caf7119b40210cad291a9a349f2 (patch) | |
tree | f6ec6fa1733b627e21a3f1c28beab8affa0f9eec /test/01HelloWorld/main.cpp | |
parent | 3fa76830d3bde5cb3c76da0cc58dd613965b98e5 (diff) |
*update
Diffstat (limited to 'test/01HelloWorld/main.cpp')
-rw-r--r-- | test/01HelloWorld/main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/01HelloWorld/main.cpp b/test/01HelloWorld/main.cpp index 77d5096..6d76c8a 100644 --- a/test/01HelloWorld/main.cpp +++ b/test/01HelloWorld/main.cpp @@ -11,15 +11,20 @@ void onEvent(jin::input::Event* e) if (e->type == EventType::QUIT) game->stop(); } - -void onUpdate(float dt) +static float dt = 0; +void onUpdate() { } void onDraw() { - + dt += 16; + if (dt > 1000) + { + std::cout << "a"; + dt = 0; + } } int main(int argc, char* argv[]) |