-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.h
57 lines (40 loc) · 833 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
57
#ifndef PLAYER_H
#define PLAYER_H
#include "D3D.h"
#include "Mesh.h"
#include "Weapon.h"
#include "Camera.h"
//#include "Controller.h"
#include "HUD.h"
class Player : public Camera
{
public:
Player();
~Player();
void Initialize(bool isPlayerOne);
void Render(float deltaTime);
void Update(float deltaTime);
bool CheckCollision(D3DXVECTOR3 *MIN, D3DXVECTOR3 *MAX);
void RemoveHealth();
void AddHealth();
void AddArmor();
void AddAmmo();
void Reset();
double fireTime;
bool canShoot = false;
bool dead;
float speed;
int health, ammo, armor;
int healthMax, ammoMax, armorMax;
Weapon weapon;
D3DXMATRIX W, T, S;
Mesh playerMesh;
D3DXVECTOR3 min, max, velocity, prevPos;
// multiplayer only
char playerMessage[120];
void fillCharBuff();
void getFromBuff(char* c);
bool isP1;
HUD hud;
};
#endif