SDL Minigame  1.0
Loading...
Searching...
No Matches
HealthComponent.h
1#pragma once
2
3#include "Direction.h"
4#include "Component.h"
5
6class Manager;
7
9{
10public:
11
12 HealthComponent(int health, Direction side) : health(health), side(side) {}
14
15 void modifyHealth(int health = -1);
16 void setHealth(int health);
17 int getHealth() { return this->health; }
18
19 void init() override;
20
21 void refreshHearts();
22 void createHeartComponents(int x);
23
24
25private:
26
27 int health;
28 Direction side;
29};
Definition Component.h:6
Definition HealthComponent.h:9
Is responsible for managing all entities.
Definition Manager.h:20