7275c0ee2ee8b03a0b4f2a37a8adcae6e45bd7fc
[supertux.git] / src / badguy / mriceblock.h
1 #ifndef __MRICEBLOCK_H__
2 #define __MRICEBLOCK_H__
3
4 #include "badguy.h"
5
6 class MrIceBlock : public BadGuy
7 {
8 public:
9   MrIceBlock(LispReader& reader);
10   MrIceBlock(float pos_x, float pos_y, Direction d);
11
12   void activate();
13   void write(LispWriter& writer);
14   HitResponse collision_solid(GameObject& other, const CollisionHit& hit);
15
16   void active_action(float elapsed_time);
17
18 protected:
19   bool collision_squished(Player& player);
20
21 private:
22   enum IceState {
23     ICESTATE_NORMAL,
24     ICESTATE_FLAT,
25     ICESTATE_KICKED
26   };
27   IceState ice_state;
28   Timer2 flat_timer;
29   int squishcount;
30   bool set_direction;
31   Direction initial_direction;  
32 };
33
34 #endif
35