fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / object / moving_sprite.hpp
index ae80634..868c622 100644 (file)
@@ -42,14 +42,22 @@ public:
   virtual void draw(DrawingContext& context);
   virtual void update(float elapsed_time);
 
-  virtual MovingSprite* clone() const = 0;
-
 protected:
   std::string sprite_name;
   Sprite* sprite;
   int layer; /**< Sprite's z-position. Refer to video/drawing_context.hpp for sensible values. */
 
+  /**
+   * set new action for sprite and resize bounding box.
+   * use with care as you can easily get stuck when resizing the bounding box.
+   */
+  void set_action(const std::string& action, int loops);
+
+  /**
+   * set new action for sprite and re-center bounding box.
+   * use with care as you can easily get stuck when resizing the bounding box.
+   */
+  void set_action_centered(const std::string& action, int loops);
 };
 
 #endif
-