Changeset 6430 in orxonox.OLD for trunk/src/world_entities/world_entity.h
- Timestamp:
- Jan 8, 2006, 12:14:49 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/world_entity.h
r6424 r6430 20 20 class BVTree; 21 21 class Model; 22 class GLGuiBar; 22 23 23 24 //class CharacterAttributes; … … 27 28 class WorldEntity : public PNode, public Synchronizeable 28 29 { 29 30 WorldEntity( const TiXmlElement* root = NULL);30 public: 31 WorldEntity(); 31 32 virtual ~WorldEntity (); 32 33 … … 35 36 void loadModel(const char* fileName, float scaling = 1.0f, unsigned int modelNumber = 0); 36 37 void setModel(Model* model, unsigned int modelNumber = 0); 37 38 Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; }; 38 39 39 40 inline void loadMD2Texture(const char* fileName) { this->md2TextureFileName = fileName; } … … 61 62 62 63 63 void debugWE() { this->debugEntity(); }; ///FIXME 64 void debugWE() { this->debugEntity(); } 65 ; ///FIXME 64 66 void debugEntity() const; 65 67 … … 82 84 int readState(byte* data, int maxLength ); 83 85 84 protected: 85 // CharacterAttributes* charAttr; //!< the character attributes of a world_entity 86 /** @returns the Energy of the entity */ 87 float getEnergy() const { return this->energy; }; 88 /** @returns the Maximum energy this entity can be charged with */ 89 float getMaxEnergy() const { return this->energyMax; } 90 float addEnergy(float energy); 91 float removeEnergy(float energy); 92 void setMaxEnergy(float maxEnergy); 86 93 87 94 88 private: 95 protected: 96 void setEnergy(float energy) { this->energy = energy; }; 97 void setEnergyWidgetVisibilit(bool visibility); 98 void createEnergyWidget(); 99 // CharacterAttributes* charAttr; //!< the character attributes of a world_entity 100 private: 101 void updateEnergyWidget(); 102 103 private: 104 /// TODO maybe we will move the following three entries and the corresponding functions to Playable AND NPC 105 float energy; //!< The Energy of this Entity, if the Entity has any energy at all. 106 float energyMax; //!< The Maximal energy this entity can take. 107 GLGuiBar* energyWidget; //!< The Slider (if wanted). 108 89 109 std::vector<Model*> models; //!< The model that should be loaded for this entity. 90 110 const char* md2TextureFileName; //!< the file name of the md2 model texture, only if this
Note: See TracChangeset
for help on using the changeset viewer.