Changed Yeti behaviour. You must stun him (jump on him) when is under a falling stala...
[supertux.git] / src / badguy / yeti.h
1 #ifndef __YETI_H__
2 #define __YETI_H__
3
4 #include "badguy.h"
5
6 class Yeti : public BadGuy
7 {
8 public:
9   Yeti(const lisp::Lisp& lisp);
10   ~Yeti();
11
12   void write(lisp::Writer& writer);
13   void active_action(float elapsed_time);
14   HitResponse collision_solid(GameObject& other, const CollisionHit& hit);
15   HitResponse collision_player(Player& player, const CollisionHit& hit);
16   HitResponse collision_badguy(BadGuy& badguy, const CollisionHit&);
17   bool collision_squished(Player& player);
18
19 private:
20   void go_right();
21   void go_left();
22   void angry_jumping();
23   void stun();
24   void drop_stalactite();
25   
26   enum YetiState {
27     INIT,
28     ANGRY_JUMPING,
29     THROW_SNOWBALL,
30     GO_RIGHT,
31     GO_LEFT,
32     STUNNED
33   };
34   enum Side {
35     LEFT,
36     RIGHT
37   };
38   Side side;
39   YetiState state;
40   Timer2 jump_timer;
41   Timer2 stun_timer;
42   int jumpcount;
43   float jump_time_left;
44   Mix_Chunk* sound_gna;
45 };
46
47 #endif
48