mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
incrementing player stats
This commit is contained in:
@@ -91,6 +91,7 @@ namespace battleship{
|
||||
inline UnitClass getUnitClass() {return unitClass;}
|
||||
inline void takeDamage(int damage) {health -= damage;}
|
||||
inline int getPlayerId() {return playerId;}
|
||||
inline int getHealth(){return health;}
|
||||
inline bool isVehicle(){return gameBase::generateView()["units"]["isVehicle"][id + 1];}
|
||||
inline bool isTargetToTheRight(vb01::Vector3 dir, vb01::Vector3 lv){return lv.getAngleBetween(dir) > vb01::PI / 2;}
|
||||
private:
|
||||
@@ -99,7 +100,7 @@ namespace battleship{
|
||||
void init();
|
||||
inline bool canDisplayOrderLine(){return vb01::getTime() - orderLineDispTime < orderVecDispLength;}
|
||||
|
||||
const int orderVecDispLength = 2000;
|
||||
const int orderVecDispLength = 2000, DEATH_HP = 0;
|
||||
sf::SoundBuffer *selectionSfxBuffer;
|
||||
sf::Sound *selectionSfx = nullptr;
|
||||
vb01::Node *hpBackgroundNode = nullptr, *hpForegroundNode = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user