blob: d86608469a47214acfd529b2387b2cebfb8a91e4 (
plain)
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
|
#ifndef PLAYER_H
#define PLAYER_H
#include "Creature.h"
#include "Weapon.h"
#include "Shotgun.h"
class Player : public Creature {
public:
Player();
void jump();
// Kill the player, in the game sense
void kill();
// Enable or disable sprinting
void setSprint(bool s);
bool getSprint();
int getXVel();
void setCrouch(int c);
int getCrouch();
void orient();
void setWeapon(int weaponNo);
void obtainWeapon(int weaponNo);
void attack();
// Current active weapon
Weapon* weapon;
private:
bool sprint;
int crouch;
// 10 weapons can be held at once
Weapon* weapons[10];
int numWeapons;
int curWeapon;
};
#endif
|