Changeset 6700 in orxonox.OLD for trunk/src/world_entities/world_entity.h
- Timestamp:
- Jan 25, 2006, 3:10:17 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/world_entity.h
r6695 r6700 87 87 88 88 /** @returns the Energy of the entity */ 89 float get Energy() const { return this->energy; };89 float getHealth() const { return this->health; }; 90 90 /** @returns the Maximum energy this entity can be charged with */ 91 float get MaxEnergy() const { return this->energyMax; }92 float addEnergy(float energy);93 float removeEnergy(float energy);94 void setMaxEnergy(float maxEnergy);95 GLGuiWidget* get EnergyWidget();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(); 96 96 97 97 protected: 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(); 101 102 // CharacterAttributes* charAttr; //!< the character attributes of a world_entity 102 103 private: 103 void update EnergyWidget();104 void updateHealthWidget(); 104 105 105 106 private: 106 107 /// 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). 110 111 111 112 std::vector<Model*> models; //!< The model that should be loaded for this entity.
Note: See TracChangeset
for help on using the changeset viewer.