Added death sprite for Kirby
authorIngo Ruhnke <grumbel@gmail.com>
Sat, 4 Oct 2014 15:37:21 +0000 (17:37 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Sat, 4 Oct 2014 15:37:21 +0000 (17:37 +0200)
data/images/creatures/kirby/kirby.sprite
data/images/creatures/kirby/squished-left.png [new file with mode: 0644]
src/badguy/kirby.cpp

index 97fba4d..0286bff 100644 (file)
@@ -1,5 +1,4 @@
 (supertux-sprite
   (action
     (name "left")
     (fps 20)
     (hitbox 8 12 38 38)
     (mirror-action "left")
   )
+
+  (action
+    (name "squished-left")
+    (hitbox 8 -5 38 38)
+    (images "squished-left.png")
+  )
+  (action
+    (name "squished-right")
+    (hitbox 8 -5 38 38)
+    (mirror-action "squished-left")
+  )
 )
diff --git a/data/images/creatures/kirby/squished-left.png b/data/images/creatures/kirby/squished-left.png
new file mode 100644 (file)
index 0000000..227e683
Binary files /dev/null and b/data/images/creatures/kirby/squished-left.png differ
index 46df9cf..ec54404 100644 (file)
@@ -35,7 +35,7 @@ Kirby::Kirby(const Vector& pos, Direction d, std::string script)
 bool
 Kirby::collision_squished(GameObject& object)
 {
-  //sprite->set_action(dir == LEFT ? "squished-left" : "squished-right");
+  sprite->set_action(dir == LEFT ? "squished-left" : "squished-right");
   kill_squished(object);
   return true;
 }