summaryrefslogtreecommitdiff
path: root/bonnie-bee/boss.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2022-10-12 06:48:14 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2022-10-27 13:22:50 -0400
commite287a11c4387382277c31735504fc762c33b4cee (patch)
treeb262dc8de64db21a7d2cb2c980f2be39805d6a34 /bonnie-bee/boss.scm
parentf713890a773a7d6ff666277592eec72f2328a5b6 (diff)
Switch to Catbird engine.
Diffstat (limited to 'bonnie-bee/boss.scm')
-rw-r--r--bonnie-bee/boss.scm24
1 files changed, 12 insertions, 12 deletions
diff --git a/bonnie-bee/boss.scm b/bonnie-bee/boss.scm
index e312d4e..7788f31 100644
--- a/bonnie-bee/boss.scm
+++ b/bonnie-bee/boss.scm
@@ -11,9 +11,9 @@
#:use-module (chickadee scripting)
#:use-module (chickadee utils)
#:use-module (oop goops)
- #:use-module (starling asset)
- #:use-module (starling node)
- #:use-module (starling node-2d)
+ #:use-module (catbird asset)
+ #:use-module (catbird node)
+ #:use-module (catbird node-2d)
#:export (<boss>))
(define-class <boss> (<grounded> <damageable> <actor>)
@@ -33,7 +33,7 @@
(let loop ((i 0))
(when (< i n)
(let ((theta (+ (* (/ tau n) i) offset)))
- (add-bullet (bullets (parent boss))
+ (add-bullet (& (parent boss) bullets)
type
(position boss)
(vec2 (* (cos theta) speed)
@@ -41,7 +41,7 @@
(loop (+ i 1))))))
(define (random-shot speed)
(let ((theta (* (- pi) (random:uniform))))
- (add-bullet (bullets (parent boss))
+ (add-bullet (& (parent boss) bullets)
medium-enemy-bullet
(position boss)
(vec2 (* (cos theta) speed)
@@ -53,9 +53,9 @@
(let ((big-speed 2.0)
(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))
+ (let ((d (direction-to boss (& (parent boss) player))))
+ (audio-play (artifact enemy-shoot-sound))
+ (add-bullet (& (parent boss) bullets)
large-enemy-bullet
(position boss)
(vec2* d big-speed))
@@ -67,7 +67,7 @@
(sleep 2.5)
(let loop ((theta 0.0))
(unless (<= (health boss) 400)
- (audio-play (asset-ref enemy-shoot-sound))
+ (audio-play (artifact enemy-shoot-sound))
(repeat 2 (random-shot 0.5))
(circle-shot 2 theta 1.5 large-enemy-bullet)
(circle-shot 6 (- theta) 1.0 medium-enemy-bullet)
@@ -75,7 +75,7 @@
(loop (+ theta (/ pi 17.1)))))
(sleep 2.5)
(let loop ((theta 0.0))
- (audio-play (asset-ref enemy-shoot-sound))
+ (audio-play (artifact enemy-shoot-sound))
(circle-shot 10 (* theta 2.0) 1.5 large-enemy-bullet)
(circle-shot 4 (- theta) 1.0 medium-enemy-bullet)
(sleep (* (current-timestep) 10))
@@ -95,6 +95,6 @@
(else #f)))
(define-method (on-death (boss <boss>))
- (audio-play (asset-ref explosion-sound))
- (add-particle-emitter (particles (particles (parent boss)))
+ (audio-play (artifact explosion-sound))
+ (add-particle-emitter (particles (& (parent boss) particles))
(make-particle-emitter (world-hitbox boss) 20 30)))