-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerObject.cpp
More file actions
42 lines (40 loc) · 1.48 KB
/
PlayerObject.cpp
File metadata and controls
42 lines (40 loc) · 1.48 KB
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
#include "PlayerObject.h"
#include "GameScreen.h"
//---------------------------------------------------------------------------
PlayerObject::PlayerObject(Ogre::String nym, Ogre::SceneManager* mgr, Simulator* sim, GameScreen* gs, Ogre::SceneNode* cm, SoundPlayer* sPlayer, Ogre::Light* lt, int clId) :
GameObject(nym, mgr, sim),
gameScreen(gs),
cameraNode(cm),
light(lt),
cam(nullptr),
mDetailsPanel(nullptr),
soundPlayer(sPlayer),
clientId(clId),
hp (100),
iframes (IFRAMES_ON_SPAWN),
outOfBounds (false),
outOfBoundsTimer (FRAMES_PER_OOB_DAMAGE) {}
//---------------------------------------------------------------------------
PlayerObject::~PlayerObject() {}
//---------------------------------------------------------------------------
void PlayerObject::addToSimulator(void) {
GameObject::addToSimulator();
body->forceActivationState(DISABLE_DEACTIVATION);
}
//---------------------------------------------------------------------------
void PlayerObject::setDeetsPan(OgreBites::ParamsPanel* mDeetsPan) {
mDetailsPanel = mDeetsPan;
}
//---------------------------------------------------------------------------
void PlayerObject::setHealth(int health){
hp = health;
}
//---------------------------------------------------------------------------
int PlayerObject::getHealth(){
return hp;
}
//---------------------------------------------------------------------------
Ogre::ParticleSystem* PlayerObject::getParticleSystem()
{
return pSys;
}