Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6700 in orxonox.OLD for trunk/src/world_entities/world_entity.h


Ignore:
Timestamp:
Jan 25, 2006, 3:10:17 PM (18 years ago)
Author:
bensch
Message:

trunk: Energy→Health

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/world_entity.h

    r6695 r6700  
    8787
    8888  /** @returns the Energy of the entity */
    89   float getEnergy() const { return this->energy; };
     89  float getHealth() const { return this->health; };
    9090  /** @returns the Maximum energy this entity can be charged with */
    91   float getMaxEnergy() const { return this->energyMax; }
    92   float addEnergy(float energy);
    93   float removeEnergy(float energy);
    94   void setMaxEnergy(float maxEnergy);
    95   GLGuiWidget* getEnergyWidget();
     91  float getHealthMax() const { return this->healthMax; }
     92  float increaseHealth(float health);
     93  float decreaseHealth(float health);
     94  void increaseHealthMax(float increaseHealth);
     95  GLGuiWidget* getHealthWidget();
    9696
    9797protected:
    98   void setEnergy(float energy) { this->energy = energy; };
    99   void setEnergyWidgetVisibilit(bool visibility);
    100   void createEnergyWidget();
     98  void setHealth(float health) { this->health = health; };
     99  void setHealthWidgetVisibilit(bool visibility);
     100  void setHealthMax(float healthMax);
     101  void createHealthWidget();
    101102  //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
    102103private:
    103   void updateEnergyWidget();
     104  void updateHealthWidget();
    104105
    105106private:
    106107  /// TODO maybe we will move the following three entries and the corresponding functions to Playable AND NPC
    107   float                   energy;             //!< The Energy of this Entity, if the Entity has any energy at all.
    108   float                   energyMax;          //!< The Maximal energy this entity can take.
    109   GLGuiBar*               energyWidget;       //!< The Slider (if wanted).
     108  float                   health;             //!< The Energy of this Entity, if the Entity has any energy at all.
     109  float                   healthMax;          //!< The Maximal energy this entity can take.
     110  GLGuiBar*               healthWidget;       //!< The Slider (if wanted).
    110111
    111112  std::vector<Model*>     models;             //!< The model that should be loaded for this entity.
Note: See TracChangeset for help on using the changeset viewer.