diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-02-15 20:27:09 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-02-15 20:27:09 -0500 |
commit | 74dd2eb94d8aebe74da9c21bd0175140a6afedb0 (patch) | |
tree | 4a1cc4be272b80739e85d7085988d7ff7e6a182c | |
parent | 012f2b0acd0157f8e87397bce7a71d0dd5e00234 (diff) |
Print FPS to stdout in examples.
* examples/common.scm: Use (2d fps) module.
-rw-r--r-- | examples/common.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/common.scm b/examples/common.scm index 0c380f2..760ce2f 100644 --- a/examples/common.scm +++ b/examples/common.scm @@ -1,5 +1,7 @@ -(use-modules (2d keyboard) +(use-modules (2d agenda) + (2d fps) (2d game) + (2d keyboard) (2d window) (2d repl server)) @@ -10,3 +12,9 @@ (quit-game)))) (add-hook! window-close-hook quit-game) + +(schedule-interval game-agenda + (lambda () + (display (fps)) + (newline)) + 60) |