From: Ingo Ruhnke Date: Sat, 4 Oct 2014 15:37:21 +0000 (+0200) Subject: Added death sprite for Kirby X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1e85c9b2f23239d85b36ad0d54551a94caef0b44;p=supertux.git Added death sprite for Kirby --- diff --git a/data/images/creatures/kirby/kirby.sprite b/data/images/creatures/kirby/kirby.sprite index 97fba4d40..0286bff53 100644 --- a/data/images/creatures/kirby/kirby.sprite +++ b/data/images/creatures/kirby/kirby.sprite @@ -1,5 +1,4 @@ (supertux-sprite - (action (name "left") (fps 20) @@ -20,4 +19,15 @@ (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 index 000000000..227e683f9 Binary files /dev/null and b/data/images/creatures/kirby/squished-left.png differ diff --git a/src/badguy/kirby.cpp b/src/badguy/kirby.cpp index 46df9cf7f..ec544044b 100644 --- a/src/badguy/kirby.cpp +++ b/src/badguy/kirby.cpp @@ -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; }