spook

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit abda32f8e039308d0038f07eff35f99bccc76cc8
parent 5b0fb01a972c3a304c96b0af06e3ed9b273a23fb
Author: Yuval Langer <yuvallangerontheroad@gmail.com>
Date:   Sun, 29 Oct 2023 13:03:53 +0000

Add score display.

Diffstat:
Mmain.scm | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/main.scm b/main.scm @@ -233,10 +233,22 @@ (+ our-sum (car our-list))))))) +(define (draw-text) + (set! (.font ctx) "30px monospace") + (if (< score 0) + (set! (.fillStyle ctx) bad-brick-fill-style) + (set! (.fillStyle ctx) good-brick-fill-style)) + (%inline ".fillText" + ctx + score + 10 + 50)) + (define (draw) (draw-clouds clouds) (draw-player player) - (draw-falling-bricks falling-bricks)) + (draw-falling-bricks falling-bricks) + (draw-text)) (define (loop time) (let* ((dt (- time last-loop-time)))