[Add] Making a start adding character health. Testing branches more than anything..
This commit is contained in:
parent
639b59da7e
commit
34d1b8f9e9
@ -58,6 +58,8 @@ void Player::HandleInput(void) {
|
||||
void Player::Update(void) {
|
||||
Move();
|
||||
AddSpeachBubble("Woot, My name is Allanis, welcome to my home");
|
||||
|
||||
|
||||
// For now The camera will be static.
|
||||
//SetCamera();
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "Globals.h"
|
||||
#include "Constants.h"
|
||||
#include "../libUnuk/Character.h"
|
||||
#include "../libUnuk/Debug.h"
|
||||
|
||||
class Player : public Character {
|
||||
public:
|
||||
@ -26,6 +27,7 @@ private:
|
||||
static const float PLAYER_SPEED;
|
||||
|
||||
string _name;
|
||||
//int _health;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -13,6 +13,7 @@ Character::Character(Map* mapArg) {
|
||||
_animationStage = ANIM_NO_FOOT;
|
||||
_animationTimer.Start();
|
||||
_leftFoot = false;
|
||||
_health = 100;
|
||||
|
||||
xVel = 0.0f;
|
||||
yVel = 0.0f;
|
||||
|
@ -33,6 +33,9 @@ public:
|
||||
void SetXVelocity(float arg) { xVel = arg; }
|
||||
void SetYVelocity(float arg) { yVel = arg; }
|
||||
|
||||
void SetHealth(int health) { _health = health; }
|
||||
int GetHealth(void) { return _health; }
|
||||
|
||||
void AddSpeachBubble(string text);
|
||||
|
||||
void Render(void);
|
||||
@ -59,6 +62,8 @@ protected:
|
||||
Timer attackTimer;
|
||||
bool attacking;
|
||||
|
||||
int _health;
|
||||
|
||||
Map* map;
|
||||
|
||||
static const float CHARACTER_SPEED;
|
||||
|
Loading…
Reference in New Issue
Block a user