Turned a lot of other global objects into Currentons
[supertux.git] / src / badguy / crystallo.cpp
index 57ae033..b3ae9d4 100644 (file)
@@ -18,6 +18,8 @@
 
 #include "sprite/sprite.hpp"
 #include "supertux/object_factory.hpp"
+#include "util/reader.hpp"
+#include "object/anchor_point.hpp"
 
 Crystallo::Crystallo(const Reader& reader) :
   WalkingBadguy(reader, "images/creatures/crystallo/crystallo.sprite", "left", "right"),
@@ -57,11 +59,9 @@ Crystallo::active_update(float elapsed_time)
 bool
 Crystallo::collision_squished(GameObject& object)
 {
-  sprite->set_action(dir == LEFT ? "shattered-left" : "shattered-right");
+  this->set_action(dir == LEFT ? "shattered-left" : "shattered-right", /* loops = */ -1, ANCHOR_BOTTOM);
   kill_squished(object);
   return true;
 }
 
-IMPLEMENT_FACTORY(Crystallo, "crystallo");
-
 /* EOF */