summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scenes/game.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/scenes/game.scm b/scenes/game.scm
index cc110f9..1011b2d 100644
--- a/scenes/game.scm
+++ b/scenes/game.scm
@@ -133,7 +133,22 @@
(define-method (populate (game <game>))
(let ((player (make <player>
#:name 'player
- #:position (vec2 620.0 1100.0))))
+ #:position (vec2 620.0 1100.0)
+ #:children
+ ;; Simple player shadow. This should better be done
+ ;; with a single ellipse shader.
+ (let ((color (make-color 0 0 0 0.2)))
+ (map (lambda (n x w)
+ (make <filled-rect>
+ #:region (make-rect 0.0 0.0 w 1.0)
+ #:position (vec2 x (- 2 n))
+ #:color color))
+ ;; position in the stack
+ (iota 5)
+ ;; x offsets
+ (list 12 10 8 10 12)
+ ;; widths
+ (list 8 12 16 12 8))))))
(set! %player player)
(list player
(make <filled-rect>