update statistics again if coins are collected
[supertux.git] / src / object / bullet.h
1 #ifndef __BULLET_H__
2 #define __BULLET_H__
3
4 #include "special/moving_object.h"
5 #include "math/physic.h"
6 #include "special/sprite.h"
7
8 using namespace SuperTux;
9
10 enum BulletsKind {
11   FIRE_BULLET,
12   ICE_BULLET
13 };
14
15 class Bullet : public MovingObject
16 {
17 public:
18   Bullet(const Vector& pos, float xm, int dir, int kind);
19   ~Bullet();
20   
21   void action(float elapsed_time);
22   void draw(DrawingContext& context);
23   HitResponse collision(GameObject& other, const CollisionHit& hit);
24
25   int kind;        
26   
27 private:
28   int life_count;
29   Physic physic;
30   Sprite* sprite;
31 };
32
33 #endif