create lisp code on the fly (still no enemies showing up in editor, no idea why....
[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(const lisp::Lisp& reader);
10   MrIceBlock(float pos_x, float pos_y, Direction d);
11
12   void activate();
13   void write(lisp::Writer& writer);
14   HitResponse collision_solid(GameObject& object, const CollisionHit& hit);
15   HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit);
16
17   void active_action(float elapsed_time);
18
19 protected:
20   bool collision_squished(Player& player);
21
22 private:
23   enum IceState {
24     ICESTATE_NORMAL,
25     ICESTATE_FLAT,
26     ICESTATE_KICKED
27   };
28   IceState ice_state;
29   Timer2 flat_timer;
30   int squishcount;
31   bool set_direction;
32   Direction initial_direction;  
33 };
34
35 #endif
36