diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-10-25 09:01:26 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-10-25 09:01:26 -0400 |
commit | 143a276a08238f9640209ed21554a4573d013d25 (patch) | |
tree | 04241850459c56bf236d6904d726710ad562ee81 | |
parent | fc9ddd1a28ae7b20bcb92d2021055d3f8df6d9c0 (diff) |
Update map; don't play explosion sound when enemy goes out of bounds.
-rw-r--r-- | game.scm | 15 | ||||
-rw-r--r-- | images/map.ase | bin | 1090 -> 1096 bytes | |||
-rw-r--r-- | images/map.png | bin | 401 -> 452 bytes | |||
-rw-r--r-- | level.tmx | 14 |
4 files changed, 15 insertions, 14 deletions
@@ -688,7 +688,8 @@ (cond ((or (enemy-dead? enemy) (enemy-out-of-bounds? enemy)) - (sound-effect-play sound:explosion) + (when (enemy-dead? enemy) + (sound-effect-play sound:explosion)) (enemy-pool-remove! pool i) (loop i (- k 1))) (else @@ -1032,12 +1033,12 @@ (let ((x* (- x (/ w 2.0))) (y* (- y(/ h 2.0)))) (or (out-of-bounds? x* y* w h) - (rect-collides-with-level? level x* y* w h) - ;; (if (rect-collides-with-level? level x* y* w h) - ;; (begin - ;; (sound-effect-play sound:bullet-hit 0.1) - ;; #t) - ;; #f) + ;; (rect-collides-with-level? level x* y* w h) + (if (rect-collides-with-level? level x* y* w h) + (begin + (sound-effect-play sound:bullet-hit 0.01) + #t) + #f) (if (rect-within? x y w h (vec2-x player-hitbox-position) (vec2-y player-hitbox-position) diff --git a/images/map.ase b/images/map.ase Binary files differindex 81fed57..8985475 100644 --- a/images/map.ase +++ b/images/map.ase diff --git a/images/map.png b/images/map.png Binary files differindex 5338adf..58f01d7 100644 --- a/images/map.png +++ b/images/map.png @@ -58,17 +58,17 @@ 1,1,1,1,1,1,1,1,0,0,0,0,1,1,1, 1,1,1,1,1,1,1,1,0,0,0,0,1,1,1, 1,1,1,1,1,1,1,1,0,0,0,0,1,1,1, -1,1,1,1,1,1,1,0,0,0,0,3,1,1,1, -1,1,1,1,1,1,0,0,0,0,3,1,1,1,1, -1,1,1,1,1,0,0,0,0,3,1,1,1,1,1, +1,1,1,1,1,1,1,5,0,0,0,3,1,1,1, +1,1,1,1,1,1,5,0,0,0,3,1,1,1,1, +1,1,1,1,1,5,0,0,0,3,1,1,1,1,1, 1,1,1,1,1,0,0,0,0,1,1,1,1,1,1, 1,1,1,1,1,0,0,0,0,1,1,1,1,1,1, 1,1,1,1,1,0,0,0,0,1,1,1,1,1,1, 1,1,1,1,1,0,0,0,0,1,1,1,1,1,1, -1,1,1,1,0,0,0,0,0,0,1,1,1,1,1, -1,1,1,0,0,0,0,0,0,0,0,1,1,1,1, -1,1,0,0,0,0,0,0,0,0,0,0,1,1,1, -1,0,0,0,0,0,0,0,0,0,0,0,0,1,1, +1,1,1,1,5,0,0,0,0,4,1,1,1,1,1, +1,1,1,5,0,0,0,0,0,0,4,1,1,1,1, +1,1,5,0,0,0,0,0,0,0,0,4,1,1,1, +1,5,0,0,0,0,0,0,0,0,0,0,4,1,1, 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1, |