- Treballant en les vides...
This commit is contained in:
@@ -1245,6 +1245,7 @@ namespace actor
|
|||||||
|
|
||||||
namespace hero
|
namespace hero
|
||||||
{
|
{
|
||||||
|
int lives = 8;
|
||||||
int boost_jumps = 0;
|
int boost_jumps = 0;
|
||||||
int boost_steps = 0;
|
int boost_steps = 0;
|
||||||
int boost_god = 0;
|
int boost_god = 0;
|
||||||
@@ -1255,11 +1256,22 @@ namespace actor
|
|||||||
void init()
|
void init()
|
||||||
{
|
{
|
||||||
boost_jumps = boost_steps = boost_god = 0;
|
boost_jumps = boost_steps = boost_god = 0;
|
||||||
|
lives = 8;
|
||||||
skills = SKILL_NONE;
|
skills = SKILL_NONE;
|
||||||
parts = PART_NONE;
|
parts = PART_NONE;
|
||||||
for (int i=0; i<100; ++i) boosters_collected[i] = false;
|
for (int i=0; i<100; ++i) boosters_collected[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int getLives()
|
||||||
|
{
|
||||||
|
return lives;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setLives(int value)
|
||||||
|
{
|
||||||
|
lives = value;
|
||||||
|
}
|
||||||
|
|
||||||
const int getBoosterFromString(char *booster)
|
const int getBoosterFromString(char *booster)
|
||||||
{
|
{
|
||||||
static const char *boostset_name[3] = {"RUN", "GOD", "JUMP"};
|
static const char *boostset_name[3] = {"RUN", "GOD", "JUMP"};
|
||||||
|
|||||||
@@ -167,6 +167,9 @@ namespace actor
|
|||||||
namespace hero
|
namespace hero
|
||||||
{
|
{
|
||||||
void init();
|
void init();
|
||||||
|
int getLives();
|
||||||
|
void setLives(int value);
|
||||||
|
|
||||||
bool giveBooster(char *booster);
|
bool giveBooster(char *booster);
|
||||||
void collectBooster(int booster, int id);
|
void collectBooster(int booster, int id);
|
||||||
bool wasBoosterCollected(int id);
|
bool wasBoosterCollected(int id);
|
||||||
|
|||||||
Reference in New Issue
Block a user