5e42965c45bf1c2a671085c5718c290716a6889c
[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   bool collision_squished(Player& player);
17   void kill_fall();
18
19 private:
20   void go_right();
21   void go_left();
22   void angry_jumping();
23   void drop_stalactite();
24   void summon_snowball();
25   
26   enum YetiState {
27     INIT,
28     ANGRY_JUMPING,
29     THROW_SNOWBALL,
30     GO_RIGHT,
31     GO_LEFT
32   };
33   Direction side;
34   YetiState state;
35   Timer2 timer;
36   int jumpcount;
37   Mix_Chunk* sound_gna;
38   Mix_Chunk* sound_roar;
39 };
40
41 #endif
42