fixed a bug, added some debug messages
[supertux.git] / src / badguy / stalactite.h
1 #ifndef __STALACTITE_H__
2 #define __STALACTITE_H__
3
4 #include "badguy.h"
5
6 class Stalactite : public BadGuy
7 {
8 public:
9   Stalactite(const lisp::Lisp& reader);
10  
11   void active_action(float elapsed_time);
12   void write(lisp::Writer& writer);
13   HitResponse collision_solid(GameObject& other, const CollisionHit& hit);
14   HitResponse collision_player(Player& player, const CollisionHit& hit);
15
16   void kill_fall();
17   void draw(DrawingContext& context);
18   void deactivate();
19
20   // returns whether or not the stalactite is harmful in it's current state
21   bool is_harmful();
22
23 protected:
24   Timer2 timer;
25
26   enum StalactiteState {
27     STALACTITE_HANGING,
28     STALACTITE_SHAKING,
29     STALACTITE_FALLING,
30     STALACTITE_SQUISHED
31   };
32   StalactiteState state;
33 };
34
35 #endif
36