summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-05-03 22:08:02 -0400
committerDavid Thompson <dthompson2@worcester.edu>2016-05-03 22:08:02 -0400
commitca6e25c2a5e4e7ef7ca3b2e2dc26f7d4fab805f4 (patch)
tree730312468dc85784d89b055877cc278ceefa442f
parenta0c2bcc7cde0e4c1fb50a361f320774edea6b688 (diff)
Animate enemies.
-rw-r--r--game.scm10
1 files changed, 9 insertions, 1 deletions
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))))