From 5f5247748f700eefd1b2ce63165944d4e3904fa9 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 30 Oct 2013 21:16:49 -0400 Subject: Update action and animation example to use new stage variables. --- examples/animation.scm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'examples/animation.scm') 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 -- cgit v1.2.3