Changeset 4975 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Aug 9, 2005, 12:23:07 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/player.cc
r4969 r4975 56 56 } 57 57 58 59 /** 60 * destructs the player, deletes alocated memory 61 */ 62 Player::~Player () 63 { 64 /* do not delete the weapons, they are contained in the pnode tree 65 and will be deleted there. 66 this only frees the memory allocated to save the list. 67 */ 68 delete this->weaponMan; 58 /** 59 * loads a Players information from a specified file. 60 * @param fileName the name of the File to load the player from (absolute path) 61 */ 62 Player::Player(const char* fileName) 63 { 64 this->init(); 65 TiXmlDocument doc(fileName); 66 67 if(!doc.LoadFile()) 68 { 69 PRINTF(2)("Loading file %s failed for player.\n", fileName); 70 return; 71 } 72 73 this->loadParams(doc.RootElement()); 69 74 } 70 75 … … 96 101 97 102 this->weaponMan->changeWeaponConfig(0); 103 } 104 105 /** 106 * destructs the player, deletes alocated memory 107 */ 108 Player::~Player () 109 { 110 /* do not delete the weapons, they are contained in the pnode tree 111 and will be deleted there. 112 this only frees the memory allocated to save the list. 113 */ 114 delete this->weaponMan; 98 115 } 99 116 -
orxonox/trunk/src/world_entities/player.h
r4954 r4975 29 29 public: 30 30 Player(); 31 Player(const char* fileName); 31 32 Player(const TiXmlElement* root); 32 33 virtual ~Player(); -
orxonox/trunk/src/world_entities/weapons/projectile.h
r4972 r4975 23 23 #include "world_entity.h" 24 24 #include "vector.h" 25 26 class ParticleEmitter;27 25 28 26 class Projectile : public WorldEntity … … 53 51 54 52 protected: 55 56 53 // energy 57 54 float energyMin; … … 65 62 66 63 Vector velocity; //!< velocity of the projectile. 67 68 ParticleEmitter* emitter; //!< For special effects each Projectile has an emitter.69 64 }; 70 65 -
orxonox/trunk/src/world_entities/weapons/weapon.h
r4972 r4975 71 71 /** 72 72 * This is used as a container for all the different kinds of weapons that may exist 73 * 74 * Weapons have certain states, and actions, that can inflict them. 75 * ex. Action WA_SHOOT leeds to State WS_SHOOTING. 76 * each action has a sound connected to it, 77 * each state a time and an animation. 73 78 */ 74 79 class Weapon : public WorldEntity
Note: See TracChangeset
for help on using the changeset viewer.