gave the Yeti hitpoints and Matze's angry roar :)
[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   void kill_fall();
19
20 private:
21   void go_right();
22   void go_left();
23   void angry_jumping();
24   void stun();
25   void drop_stalactite();
26   
27   enum YetiState {
28     INIT,
29     ANGRY_JUMPING,
30     THROW_SNOWBALL,
31     GO_RIGHT,
32     GO_LEFT,
33     STUNNED
34   };
35   enum Side {
36     LEFT,
37     RIGHT
38   };
39   Side side;
40   YetiState state;
41   Timer2 jump_timer;
42   Timer2 stun_timer;
43   int jumpcount;
44   float jump_time_left;
45   Mix_Chunk* sound_gna;
46   Mix_Chunk* sound_roar;
47 };
48
49 #endif
50