summaryrefslogtreecommitdiff
path: root/examples/simple.scm
blob: 8a1fd8fd00b0707b84e82247432e83a348eb58a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(use-modules (2d sprite)
             (2d game)
             (2d vector2))

(define (demo-sprite)
  (load-sprite "images/ghost.png"
               #:position (vector2 320 240)))

(define-scene demo
  #:title  "Demo"
  #:draw   (lambda (sprite) (draw-sprite sprite))
  #:state  (demo-sprite))

(define-game simple
  #:title       "Simple Demo"
  #:first-scene demo)

(run-game simple)