diff options
author | chai <chaifix@163.com> | 2019-02-10 22:07:51 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-02-10 22:07:51 +0800 |
commit | 9a97533dedd1e3e8d75ef4f0dc7935201a5dba2b (patch) | |
tree | 926fa2d182af7c1bd3c3899369d8c0e85773cd9c /src/libjin-lua/scripts/time/time.lua | |
parent | 63547185567a4bc9c66ad2420134e2dc4a1a58ba (diff) |
*格式化
Diffstat (limited to 'src/libjin-lua/scripts/time/time.lua')
-rw-r--r-- | src/libjin-lua/scripts/time/time.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libjin-lua/scripts/time/time.lua b/src/libjin-lua/scripts/time/time.lua index 61c6ab1..4f4a37b 100644 --- a/src/libjin-lua/scripts/time/time.lua +++ b/src/libjin-lua/scripts/time/time.lua @@ -6,20 +6,20 @@ local fps = 0 local t = 0 jin.time.getFPS = function() - return fps + return fps end local step = jin.time.step jin.time.step = function() - step() - -- Update fps - t = t + jin.time.getDelta() - if t > 1 then - t = t - 1 - fps = f + 1 - f = 0 - else - f = f + 1 - end + step() + -- Update fps + t = t + jin.time.getDelta() + if t > 1 then + t = t - 1 + fps = f + 1 + f = 0 + else + f = f + 1 + end end |