// $Id$
//
// SuperTux
-// Copyright (C) 2004 Ingo Ruhnke <grumbel@gmx.de>
-// Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
+// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
#include <string>
#include <memory>
+#include <list>
#include "game_object.hpp"
#include "lisp/lisp.hpp"
#include "math/vector.hpp"
* another SpriteChange object.
*/
std::string stay_action;
+
/**
- * should the stayaction be displayed
+ * name of a group in which only one SpriteChange will ever have its stay_action displayed.
+ * Leave empty if you don't care.
*/
- bool in_stay_action;
+ std::string stay_group;
virtual void draw(DrawingContext& context);
virtual void update(float elapsed_time);
+
+ /**
+ * Activates the SpriteChange's stay action, if applicable
+ */
+ void set_stay_action();
+
+ /**
+ * Deactivates the SpriteChange's stay action, if applicable
+ */
+ void clear_stay_action();
+
+private:
+ /**
+ * should the stayaction be displayed
+ */
+ bool in_stay_action;
+
+ static std::list<SpriteChange*> all_sprite_changes;
+
};
}
#endif
-