diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-01-10 07:45:41 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-01-10 07:45:41 -0500 |
commit | 5523027f6369e9ec3f990144e8ef2cd4f243476e (patch) | |
tree | df91f447da824dd5e15f0d86aae9e5ec3d4f0409 /examples/common.scm | |
parent | 6bdd1e305834dcc9be22d9a54d84f025a24d4825 (diff) |
Update some of the example programs to use the new API.
* 2d/examples/common.scm: New file.
* 2d/examples/coroutine.scm: Updated.
* 2d/examples/font.scm: Updated.
* 2d/examples/simple.scm: Updated.
* 2d/examples/tilemap.scm: Updated.
Diffstat (limited to 'examples/common.scm')
-rw-r--r-- | examples/common.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/common.scm b/examples/common.scm new file mode 100644 index 0000000..15bc53b --- /dev/null +++ b/examples/common.scm @@ -0,0 +1,8 @@ +(use-modules (2d keyboard) + (2d repl server)) + +(spawn-server) + +(add-hook! key-press-hook (lambda (key unicode) + (when (eq? key 'escape) + (quit-game)))) |