diff options
Diffstat (limited to 'bonnie-bee/boss.scm')
-rw-r--r-- | bonnie-bee/boss.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bonnie-bee/boss.scm b/bonnie-bee/boss.scm index 885f0bc..e312d4e 100644 --- a/bonnie-bee/boss.scm +++ b/bonnie-bee/boss.scm @@ -21,9 +21,12 @@ (define-method (on-boot (boss <boss>)) (attach-to boss - (make <sprite> - #:texture beetle-image - #:origin (vec2 64.0 32.0)))) + (make <animated-sprite> + #:atlas beetle-atlas + #:origin (vec2 64.0 32.0) + #:animations `((default . ,(make <animation> + #:frames #(0 1) + #:frame-duration 0.4)))))) (define-method (on-enter (boss <boss>)) (define (circle-shot n offset speed type) @@ -51,13 +54,13 @@ (little-speed 1.0)) (while (> (health boss) 800) (let ((d (direction-to boss (player (parent boss))))) + (audio-play (asset-ref enemy-shoot-sound)) (add-bullet (bullets (parent boss)) large-enemy-bullet (position boss) (vec2* d big-speed)) (let loop ((i 0)) (when (< i 16) - (audio-play (asset-ref enemy-shoot-sound)) (random-shot little-speed) (sleep (* (current-timestep) 2.0)) (loop (+ i 1))))))) |