summaryrefslogtreecommitdiff
path: root/examples/animation.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-10-30 21:16:49 -0400
committerDavid Thompson <dthompson2@worcester.edu>2013-10-30 21:16:49 -0400
commit5f5247748f700eefd1b2ce63165944d4e3904fa9 (patch)
tree77a383c8fc1a3b2aa4225a374c4ae7f3a756382b /examples/animation.scm
parentecc7e2324140dc2dec61316ad3a584d8e34898df (diff)
Update action and animation example to use new stage variables.
Diffstat (limited to 'examples/animation.scm')
-rw-r--r--examples/animation.scm6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/animation.scm b/examples/animation.scm
index bf43be9..92da549 100644
--- a/examples/animation.scm
+++ b/examples/animation.scm
@@ -22,16 +22,14 @@ sprite out of it."
(tileset-ref tiles 26))))
(make-animation frames 6 #t)))
-(define (demo-sprite)
+(define-stage-variable sprite
(make-sprite (demo-animation)
#:position (vector2 320 240)))
(define demo-scene
(make-scene
- #:init (lambda ()
- (stage-define sprite (demo-sprite)))
#:draw (lambda ()
- (draw-sprite (stage-ref sprite)))))
+ (draw-sprite (sprite)))))
(define animation-demo
(make-game