-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.cpp
76 lines (62 loc) · 936 Bytes
/
Player.cpp
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include "Header Files/Player.h"
Player::Player()
{
m_object = nullptr;
m_name = "";
m_health = 0;
m_controllerID = 0;
m_weight = 0.f;
m_speed = 0.f;
}
Player::~Player()
{
delete m_object;
}
string Player::GetName()
{
return m_name;
}
void Player::SetName(string name)
{
m_name = name;
}
int Player::GetHealth()
{
return m_health;
}
void Player::SetHealth(int health)
{
m_health = health;
}
float Player::GetSpeed()
{
return m_speed;
}
void Player::SetSpeed(float speed)
{
m_speed = speed;
}
float Player::GetWeight()
{
return m_weight;
}
void Player::SetWeight(float weight)
{
m_weight = weight;
}
int Player::GetControllerID()
{
return m_controllerID;
}
void Player::SetControllerID(int id)
{
m_controllerID = id;
}
Object* Player::GetObject()
{
return m_object;
}
void Player::SetObject(Object* object)
{
m_object = object;
}