-
Notifications
You must be signed in to change notification settings - Fork 1
/
bullet.h
56 lines (43 loc) · 1.06 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include "gameObject.h"
struct tagPlayerBullet
{
image* image;
floatRect rc;
Vector2 position;
Vector2 firePosition;
float angle;
float speed;
int currentFrameX, currentFrameY;
int count;
POINT next[8];
int _nowOrder;
bool nomal;
int floor;
};
class bullet : public gameObject
{
private:
vector<tagPlayerBullet> _vPlayerBullet;
vector<tagPlayerBullet>::iterator _viPlayerBullet;
float _range;
float _alpha;
bool _isAlpha;
float _deleteBulletAngle;
public:
bullet() {};
~bullet() {};
virtual HRESULT init();
virtual void release();
virtual void update();
virtual void render();
void fire(float x, float y, float angle, float speed);
void nomalFire(float x, float y, float angle,float speed);
void move();
void remove(int arrNum);
void removeEffect(float x, float y);
void collision();
void setPlayerBullet(int i, float angle) { _vPlayerBullet[i].angle = angle; }
vector<tagPlayerBullet> getVPlayerBullet() { return _vPlayerBullet; }
vector<tagPlayerBullet>::iterator getViPlayerBullet() { return _viPlayerBullet; }
};