-Worldmap cleanups (use DrawingContext transformstack)
[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 private:
21   Physic physic;
22   Timer2 timer;
23
24   enum StalactiteState {
25     STALACTITE_HANGING,
26     STALACTITE_SHAKING,
27     STALACTITE_FALLING,
28     STALACTITE_SQUISHED
29   };
30   StalactiteState state;
31 };
32
33 #endif
34