[feat] level-2
This commit is contained in:
parent
d6d73f72b4
commit
183814559c
1 changed files with 9 additions and 7 deletions
16
game.scm
16
game.scm
|
@ -95,9 +95,7 @@
|
||||||
(make-level-1))
|
(make-level-1))
|
||||||
((= *current-level* 2)
|
((= *current-level* 2)
|
||||||
(make-level-2))
|
(make-level-2))
|
||||||
)
|
))
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
(define *level* (make-current-level))
|
(define *level* (make-current-level))
|
||||||
|
|
||||||
|
@ -216,12 +214,16 @@
|
||||||
|
|
||||||
; Draw title
|
; Draw title
|
||||||
(match (level-state *level*)
|
(match (level-state *level*)
|
||||||
('win
|
((or 'win 'thanks)
|
||||||
(set-text-align! context "center")
|
(set-text-align! context "center")
|
||||||
(set-font! context "bold 24px monospace")
|
(set-font! context "bold 24px monospace")
|
||||||
(fill-text context "Goal equal! Press Enter to continue" (/ game-width 2.0) (/ game-height 2.0)))
|
(if (= *current-level* 2)
|
||||||
(_ #t))
|
(begin (fill-text context "That's it, Thanks for playing." (/ game-width 2.0) (/ game-height 2.0))
|
||||||
(request-animation-frame draw-callback)))
|
(set-level-state! *level* 'thanks))
|
||||||
|
(fill-text context "Goal equal! Press Enter to continue." (/ game-width 2.0) (/ game-height 2.0))
|
||||||
|
))
|
||||||
|
(_ #t)))
|
||||||
|
(request-animation-frame draw-callback))
|
||||||
(define draw-callback (procedure->external draw))
|
(define draw-callback (procedure->external draw))
|
||||||
|
|
||||||
(set-element-width! canvas (exact game-width))
|
(set-element-width! canvas (exact game-width))
|
||||||
|
|
Loading…
Reference in a new issue