diff options
author | David Thompson <dthompson2@worcester.edu> | 2013-10-23 22:53:21 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2013-10-23 22:53:21 -0400 |
commit | f8e3151e456c5b48604a0fa56197b2b599bba77a (patch) | |
tree | 2e513a043a44d42b32b5cb9be300808578ac514e | |
parent | 96c63060ce2f63582b5f09c6897f999e3ec6e11e (diff) |
Update animation demo.
-rw-r--r-- | examples/animation.scm | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/examples/animation.scm b/examples/animation.scm index c165568..bf43be9 100644 --- a/examples/animation.scm +++ b/examples/animation.scm @@ -1,6 +1,9 @@ (use-modules (2d animation) (2d game) + (2d game-loop) + (2d scene) (2d sprite) + (2d stage) (2d tileset) (2d vector2) (2d window)) @@ -23,13 +26,16 @@ sprite out of it." (make-sprite (demo-animation) #:position (vector2 320 240))) -(define-scene demo - #:title "Demo" - #:draw (lambda (sprite) (draw-sprite sprite)) - #:state (demo-sprite)) +(define demo-scene + (make-scene + #:init (lambda () + (stage-define sprite (demo-sprite))) + #:draw (lambda () + (draw-sprite (stage-ref sprite))))) -(define-game animation - #:title "Animation" - #:first-scene demo) +(define animation-demo + (make-game + #:title "Animation" + #:first-scene demo-scene)) -(run-game animation) +(run-game animation-demo) |