From 3fc18437f905f18aa4bf3b688930dbc68f8721b3 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 23 Oct 2021 17:09:34 -0400 Subject: Lots of tweaks and also sprite animations! --- bonnie-bee/boss.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bonnie-bee/boss.scm') 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 )) (attach-to boss - (make - #:texture beetle-image - #:origin (vec2 64.0 32.0)))) + (make + #:atlas beetle-atlas + #:origin (vec2 64.0 32.0) + #:animations `((default . ,(make + #:frames #(0 1) + #:frame-duration 0.4)))))) (define-method (on-enter (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))))))) -- cgit v1.2.3