Changeset 6804 in orxonox.OLD for trunk/src/world_entities/playable.cc
- Timestamp:
- Jan 28, 2006, 11:29:03 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r6710 r6804 38 38 // the reference to the Current Player is NULL, because we dont have one at the beginning. 39 39 this->currentPlayer = NULL; 40 41 this->bFire = false; 40 42 41 43 this->setSynchronized(true); … … 201 203 } 202 204 205 /** 206 * @brief ticks a Playable 207 * @param dt: the passed time since the last Tick 208 */ 209 void Playable::tick(float dt) 210 { 211 this->weaponMan->tick(dt); 212 if (this->bFire) 213 weaponMan->fire(); 214 } 215 216 217 /** 218 * @brief processes Playable events. 219 * @param event the Captured Event. 220 */ 221 void Playable::process(const Event &event) 222 { 223 if( event.type == KeyMapper::PEV_FIRE1) 224 this->bFire = event.bPressed; 225 else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed) 226 { 227 this->nextWeaponConfig(); 228 } 229 else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed) 230 this->previousWeaponConfig(); 231 } 232 233 203 234 204 235 void Playable::attachCamera() … … 210 241 211 242 243 244 212 245 void Playable::detachCamera() 213 246 {
Note: See TracChangeset
for help on using the changeset viewer.