-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.h
56 lines (39 loc) · 813 Bytes
/
Player.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
56
#ifndef _PLAYER_H
#define _PLAYER_H
#include "AnimatedTexture.h"
#include "InputManager.h"
#include "AudioManager.h"
#include "Bullet.h"
using namespace QuickSDL;
class Player : public GameEntity
{
private:
Timer* mTimer;
InputManager* mInput;
AudioManager* mAudio;
bool mVisible;
bool mAnimating;
int mScore;
int mLives;
Texture* mShip;
AnimatedTexture* mDeathAnimation;
float mMoveSpeed;
Vector2 mMoveBounds;
static const int MAX_BULLETS = 2;
Bullet* mBullets[MAX_BULLETS];
private:
void HandleMovement();
void HandleFiring();
public:
Player();
~Player();
void Visible(bool visible);
bool IsAnimating();
int Score();
int Lives();
void AddScore(int change);
void WasHit();
void Update();
void Render();
};
#endif