Changeset 3583 in orxonox.OLD for orxonox/trunk/src/world_entities/weapon.cc
- Timestamp:
- Mar 16, 2005, 11:08:33 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapon.cc
r3579 r3583 33 33 */ 34 34 Weapon::Weapon () : WorldEntity() 35 { 36 this->model = new OBJModel(""); 37 } 35 {} 38 36 39 37 … … 55 53 */ 56 54 void Weapon::enable() 57 {} 55 { 56 this->enabled = true; 57 } 58 58 59 59 … … 66 66 */ 67 67 void Weapon::disable() 68 {} 68 { 69 this->enabled = false; 70 } 69 71 70 72 … … 78 80 */ 79 81 bool Weapon::isEnabled() 80 {} 82 { 83 return this->enabled; 84 } 81 85 82 86 … … 133 137 {} 134 138 135 136 /** 137 \brief this sets the energy of a weapon 138 \param amount of energy 139 140 a weapon has a limited amount of energy, this means a limited amount of shoots 141 */ 142 void Weapon::setWeaponEnergy(int energy) 143 {} 144 145 /** 146 \brief adds weapon energy 147 \param amount of energy 148 \returns amount of energy, that is over the energy limit 149 150 this can be used for energy-power up for example. There is a limited amount of energy 151 a weapon can have. so if you want to add more, than it supports, the rest will 152 be returned from this weapon. 153 */ 154 int Weapon::addWeaponEnergy(int addEnergy) 155 {} 156 157 /** 158 \brief removes weapon energy 159 \param amount of enery 160 161 this is the case, when ther should be some sort of energy loss in the weapon 162 system. propably wont be the case but usefull to have 163 */ 164 void Weapon::substractWeaponEnergy(int subEnergy) 165 {} 166 167 /** 168 \brief gets the amount of energy of a weapon (= ammo) 169 */ 170 int Weapon::getWeaponEnergy() 139 /** 140 \brief sets a weapon idle time 141 \param idle time in ms 142 143 a weapon idle time is the time spend after a shoot until the weapon can 144 shoot again 145 */ 146 void Weapon::setWeaponIdleTime(float time) 147 {} 148 149 /** 150 \brief gets the weapon idle time 151 \returns idle time in ms 152 153 a weapon idle time is the time spend after a shoot until the weapon can 154 shoot again 155 */ 156 float Weapon::getWeaponIdleTime(void) 157 {} 158 159 /** 160 \brief checks if the idle time is elapsed 161 \return true if time is elapsed 162 163 a weapon idle time is the time spend after a shoot until the weapon can 164 shoot again 165 */ 166 bool Weapon::hasWeaponIdleTimeElapsed(void) 171 167 {} 172 168 … … 211 207 212 208 /** 209 \brief is called, when there is no fire button pressed 210 */ 211 void Weapon::weaponIdle() 212 {} 213 214 215 /** 213 216 \brief this will draw the weapon 214 217 */ 215 218 void Weapon::draw () 216 { 217 glMatrixMode(GL_MODELVIEW); 218 glPushMatrix(); 219 220 float matrix[4][4]; 221 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 222 this->getAbsDir().matrix (matrix); 223 glMultMatrixf((float*)matrix); 224 this->model->draw(); 225 226 glPopMatrix(); 227 } 228 219 {} 220
Note: See TracChangeset
for help on using the changeset viewer.