-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBullet.h
44 lines (38 loc) · 967 Bytes
/
Bullet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef GUARD_BULLET_H
#define GUARD_BULLET_H
#include "ShooterObject.h"
class Bullet: public ShooterObject
{
public:
Bullet(ShooterObject* owner);
virtual void update();
virtual void draw();
virtual void collision();
virtual void move();
virtual void shot();
virtual std::string type(){return "Bullet";}
private:
void killTileMap(Direction direction, int *tileID);
private:
virtual void doDyingAnimation();
virtual void checkBulletsObjectsCollision(){}
virtual void checkMapCollision();
ShooterObject* m_owner;
};
class PlayerBullet:public Bullet
{
public:
PlayerBullet(ShooterObject* owner):Bullet(owner){}
virtual std::string type(){return "PlayerBullet";}
private:
virtual void checkBulletsObjectsCollision();
};
class EnemyBullet: public Bullet
{
public:
EnemyBullet(ShooterObject* owner):Bullet(owner){}
virtual std::string type(){return "EnemyBullet";}
private:
virtual void checkBulletsObjectsCollision();
};
#endif // !GUARD_BULLET_H