added a bell object which is a new better way to do reset points
[supertux.git] / src / object / bell.h
1 #ifndef __BELL_H__
2 #define __BELL_H__
3
4 #include "lisp/lisp.h"
5 #include "special/moving_object.h"
6 #include "special/sprite.h"
7 #include "serializable.h"
8
9 using namespace SuperTux;
10
11 /**
12  * A bell: When tux touches it, it begins ringing and you will respawn at this
13  * position.
14  */
15 class Bell : public MovingObject, public Serializable
16 {
17 public:
18   Bell(const lisp::Lisp& lisp);
19   ~Bell();
20
21   void write(lisp::Writer& writer);
22   void action(float elapsed_time);
23   void draw(DrawingContext& context);
24   HitResponse collision(GameObject& other, const CollisionHit& hit);
25
26 private:
27   Sprite* sprite;
28   bool ringing;
29 };
30
31 #endif
32