From 0ef1e9734ba2e10d74ca2f265241331788ef2559 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 28 Oct 2023 22:57:31 -0400 Subject: Add tense chasing section. --- game.scm | 27 ++++++++++++++++++++++++++- level.tmx | 25 ++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/game.scm b/game.scm index 5f1d5d8..1c857b0 100644 --- a/game.scm +++ b/game.scm @@ -736,6 +736,7 @@ (duration (or (assq-ref properties 'duration) 0))) (when speed (change-scroll-speed speed duration)))) + ('chaser (spawn-chaser x y)) ('warning (do-warning)) (_ #t))) (define max-scroll (- (* (level-height level) tile-height) game-height)) @@ -957,7 +958,7 @@ (define (spawn-flyer1* x y script) (spawn-enemy - (make-enemy 'flyer1 10 (vec2 x y) (vec2 16.0 16.0) + (make-enemy 'flyer1 30 (vec2 x y) (vec2 22.0 16.0) (vec2 0.0 0.0) script 1000 #(0.0 24.0 48.0 72.0) image:flyer1 (vec2 24.0 24.0)))) @@ -1012,6 +1013,30 @@ (define (spawn-flyer1 x y) (spawn-flyer1* x y #f)) + (define (spawn-chaser x y) + (define (script flyer) + (set-enemy-dy! flyer -3.0) + (wait 30) + (tween (lambda (dy) + (set-enemy-dy! flyer dy)) + 30 -3.0 -1.0 + smoothstep lerp) + (tween (lambda (dy) + (set-enemy-dy! flyer dy)) + 30 -1.0 -2.9 + smoothstep lerp) + (wait (* 5 60)) + (tween (lambda (dy) + (set-enemy-dy! flyer dy)) + 30 -2.9 -1.2 + smoothstep lerp) + (wait (+ (* 3 60) 30)) + (tween (lambda (dy) + (set-enemy-dy! flyer dy)) + 30 -1.2 0.0 + smoothstep lerp)) + (spawn-flyer1* x (+ y game-height 8.0) script)) + (define (spawn-boss x y) (spawn-enemy (make-enemy 'boss 300 (vec2 x (- y 24.0)) (vec2 144.0 50.0) diff --git a/level.tmx b/level.tmx index 0a02fa4..d925b2b 100644 --- a/level.tmx +++ b/level.tmx @@ -1,5 +1,5 @@ - + @@ -1228,5 +1228,28 @@ + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3