From ca6e25c2a5e4e7ef7ca3b2e2dc26f7d4fab805f4 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 3 May 2016 22:08:02 -0400 Subject: Animate enemies. --- game.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'game.scm') diff --git a/game.scm b/game.scm index 839796e..a848392 100644 --- a/game.scm +++ b/game.scm @@ -752,7 +752,15 @@ each time KEY is pressed." ('popcorn-light 4) ('pincer-dark 8) ('pincer-light 12)) - (if hit? 2 0))))) + (if hit? + ;; Use the hit + ;; indicator frame. + 2 + ;; Swap between the + ;; 2 normal + ;; animation frames. + (modulo (round (/ time 5)) + 2)))))) (sprite-batch-add! batch context tex rect))) enemies)))) -- cgit v1.2.3