This repository was archived by the owner on Aug 2, 2024. It is now read-only.
forked from aNdReA9111/1-VS-All-phabet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharacter.hpp
More file actions
33 lines (31 loc) · 1.39 KB
/
Character.hpp
File metadata and controls
33 lines (31 loc) · 1.39 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
#include "Bullet.hpp"
class Character {
protected:
int x; // coordinata x
int y; // coordinata y
double hp; // healt points
int atk; // attacco (contatto)
int def; // difesa
char look; // lettera usata per identificare il personaggio
public:
Character(); // costruttore di default
Character(char look); // costruttore
Character(int x, int y, double hp, int atk, int def, char look); // costruttore
void setX_Y(int x0, int y0); // setta il valore delle due coordinate
void moveright(Map mappa); // muove a dx
void moveleft(Map mappa); // muove a sx
void moveup(Map mappa); // muove su
void movedown(Map mappa); // muove giu
pbul fire(pbul ls_proiettili, Map &map, int dir, bool from); // funzione spara
int getX(); // ritorna valore della coordinata x
int getY(); // ritorna valore della coordinata y
void SetHp(double hp); // setta la vita
double getHp(); // ottiene la vita
void incHP(double n); // aumento della vita
int getAtk(); // ritorna valore di attacco
void incAtk(int n); // aumenta il valore di attacco
int getDef(); // ritorna valore di difesa
void incDef(int n); // aumenta il valore di difesa
char getLook(); // ritorna il carattere che rappresenta il Character
void setLook(char look); // imposta il carattere che rappresenta il Character
};