--- /dev/null
+(supertux-sprite
+
+ (action
+ (name "left")
+ (fps 20)
+ (hitbox 8 12 38 38)
+ (images "walk-0.png"
+ "walk-1.png"
+ "walk-2.png"
+ "walk-3.png"
+ "walk-4.png"
+ "walk-5.png"
+ "walk-6.png"
+ "walk-7.png"
+ )
+ )
+ (action
+ (name "right")
+ (fps 20)
+ (hitbox 8 12 38 38)
+ (mirror-action "left")
+ )
+)
(layer -50)
(sprite "images/decal/halloween/tree.png")
)
+ (kirby
+ (x 1256)
+ (y 396)
+ )
+ (kirby
+ (x 1096)
+ (y 172)
+ )
+ (kirby
+ (x 1960)
+ (y 524)
+ )
+ (kirby
+ (x 2984)
+ (y 588)
+ )
+ (kirby
+ (x 2920)
+ (y 588)
+ )
(spawnpoint
(name "main")
(x 768)
--- /dev/null
+// SuperTux
+// Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "badguy/kirby.hpp"
+
+#include "sprite/sprite.hpp"
+#include "supertux/object_factory.hpp"
+
+Kirby::Kirby(const Reader& reader)
+ : WalkingBadguy(reader, "images/creatures/kirby/kirby.sprite", "left", "right")
+{
+ walk_speed = 80;
+}
+
+Kirby::Kirby(const Vector& pos, Direction d, std::string script)
+ : WalkingBadguy(pos, d, "images/creatures/kirby/kirby.sprite", "left", "right")
+{
+ walk_speed = 80;
+ dead_script = script;
+}
+
+bool
+Kirby::collision_squished(GameObject& object)
+{
+ //sprite->set_action(dir == LEFT ? "squished-left" : "squished-right");
+ kill_squished(object);
+ return true;
+}
+
+/* EOF */
--- /dev/null
+// SuperTux
+// Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef HEADER_SUPERTUX_BADGUY_KIRBY_HPP
+#define HEADER_SUPERTUX_BADGUY_KIRBY_HPP
+
+#include "badguy/walking_badguy.hpp"
+
+class Kirby : public WalkingBadguy
+{
+public:
+ Kirby(const Reader& reader);
+ Kirby(const Vector& pos, Direction d, std::string script);
+
+protected:
+ bool collision_squished(GameObject& object);
+
+};
+
+#endif
+
+/* EOF */
#include "badguy/igel.hpp"
#include "badguy/jumpy.hpp"
#include "badguy/kamikazesnowball.hpp"
+#include "badguy/kirby.hpp"
#include "badguy/kugelblitz.hpp"
#include "badguy/livefire.hpp"
#include "badguy/mole.hpp"
add_factory<Igel>("igel");
add_factory<Jumpy>("jumpy");
add_factory<KamikazeSnowball>("kamikazesnowball");
+ add_factory<Kirby>("kirby");
add_factory<Kugelblitz>("kugelblitz");
add_factory<LiveFire>("livefire");
add_factory<LiveFireAsleep>("livefire_asleep");