Changeset 5831 for code/branches/core5/src/orxonox
- Timestamp:
- Sep 28, 2009, 10:48:47 PM (15 years ago)
- Location:
- code/branches/core5/src/orxonox
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/controllers/AIController.cc
r5738 r5831 44 44 RegisterObject(AIController); 45 45 46 this->actionTimer_.setTimer(ACTION_INTERVAL, true, this, createExecutor(createFunctor(&AIController::action)));46 this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&AIController::action, this))); 47 47 } 48 48 -
code/branches/core5/src/orxonox/controllers/AIController.h
r5738 r5831 50 50 51 51 private: 52 Timer <AIController>actionTimer_;52 Timer actionTimer_; 53 53 }; 54 54 } -
code/branches/core5/src/orxonox/controllers/WaypointPatrolController.cc
r5738 r5831 45 45 this->alertnessradius_ = 500; 46 46 47 this->patrolTimer_.setTimer(rnd(), true, this, createExecutor(createFunctor(&WaypointPatrolController::searchEnemy)));47 this->patrolTimer_.setTimer(rnd(), true, createExecutor(createFunctor(&WaypointPatrolController::searchEnemy, this))); 48 48 } 49 49 -
code/branches/core5/src/orxonox/controllers/WaypointPatrolController.h
r5738 r5831 61 61 int team_; 62 62 float alertnessradius_; 63 Timer <WaypointPatrolController>patrolTimer_;63 Timer patrolTimer_; 64 64 }; 65 65 } -
code/branches/core5/src/orxonox/gametypes/TeamBaseMatch.cc
r5806 r5831 42 42 RegisterObject(TeamBaseMatch); 43 43 44 this->scoreTimer_.setTimer(10, true, this, createExecutor(createFunctor(&TeamBaseMatch::winPoints)));45 this->outputTimer_.setTimer(10, true, this, createExecutor(createFunctor(&TeamBaseMatch::showPoints)));44 this->scoreTimer_.setTimer(10, true, createExecutor(createFunctor(&TeamBaseMatch::winPoints, this))); 45 this->outputTimer_.setTimer(10, true, createExecutor(createFunctor(&TeamBaseMatch::showPoints, this))); 46 46 47 47 this->pointsTeam1_ = 0; -
code/branches/core5/src/orxonox/gametypes/TeamBaseMatch.h
r5738 r5831 65 65 66 66 std::set<TeamBaseMatchBase*> bases_; 67 Timer <TeamBaseMatch>scoreTimer_;68 Timer <TeamBaseMatch>outputTimer_;67 Timer scoreTimer_; 68 Timer outputTimer_; 69 69 70 70 //points for each team -
code/branches/core5/src/orxonox/graphics/FadingBillboard.cc
r5738 r5831 103 103 { 104 104 this->changedirection_ = 1; 105 this->turnonofftimer_.setTimer(this->turnontime_, false, this, createExecutor(createFunctor(&FadingBillboard::stopturnonoff)));105 this->turnonofftimer_.setTimer(this->turnontime_, false, createExecutor(createFunctor(&FadingBillboard::stopturnonoff, this))); 106 106 107 107 if (this->isVisible()) … … 111 111 { 112 112 this->changedirection_ = -1; 113 this->turnonofftimer_.setTimer(this->turnofftime_, false, this, createExecutor(createFunctor(&FadingBillboard::stopturnonoff)));113 this->turnonofftimer_.setTimer(this->turnofftime_, false, createExecutor(createFunctor(&FadingBillboard::stopturnonoff, this))); 114 114 } 115 115 } … … 126 126 this->fadedColour_ = ColourValue::ZERO; 127 127 this->getBillboardSet().setColour(this->fadedColour_); 128 this->turnonofftimer_.setTimer(this->postprocessingtime_, false, this, createExecutor(createFunctor(&FadingBillboard::poststopturnonoff)));128 this->turnonofftimer_.setTimer(this->postprocessingtime_, false, createExecutor(createFunctor(&FadingBillboard::poststopturnonoff, this))); 129 129 } 130 130 this->changedirection_ = 0; -
code/branches/core5/src/orxonox/graphics/FadingBillboard.h
r5738 r5831 74 74 float turnofftime_; 75 75 float postprocessingtime_; 76 Timer <FadingBillboard>turnonofftimer_;76 Timer turnonofftimer_; 77 77 char changedirection_; 78 78 ColourValue fadedColour_; -
code/branches/core5/src/orxonox/graphics/ParticleSpawner.cc
r5801 r5831 96 96 return; 97 97 98 this->timer_.setTimer(this->startdelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::fireParticleSpawner)));98 this->timer_.setTimer(this->startdelay_, false, createExecutor(createFunctor(&ParticleSpawner::fireParticleSpawner, this))); 99 99 } 100 100 … … 103 103 this->setActive(true); 104 104 if (this->lifetime_ != 0) 105 this->timer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&ParticleSpawner::stopParticleSpawner)));105 this->timer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&ParticleSpawner::stopParticleSpawner, this))); 106 106 } 107 107 … … 116 116 117 117 if (!this->timer_.isActive() || this->timer_.getRemainingTime() > this->destroydelay_) 118 this->timer_.setTimer(this->destroydelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner)));118 this->timer_.setTimer(this->destroydelay_, false, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner, this))); 119 119 } 120 120 else if (this->bLoop_) 121 121 { 122 this->timer_.setTimer(this->destroydelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::startParticleSpawner)));122 this->timer_.setTimer(this->destroydelay_, false, createExecutor(createFunctor(&ParticleSpawner::startParticleSpawner, this))); 123 123 } 124 124 } -
code/branches/core5/src/orxonox/graphics/ParticleSpawner.h
r5791 r5831 89 89 void destroyParticleSpawner(); 90 90 91 Timer <ParticleSpawner>timer_;91 Timer timer_; 92 92 93 93 bool bSuppressStart_; -
code/branches/core5/src/orxonox/pickup/DroppedItem.cc
r5801 r5831 76 76 if (this->timeToLive_ > 0) 77 77 { 78 ExecutorMember<DroppedItem>* exec = createExecutor(createFunctor(&DroppedItem::timerCallback)); 79 this->timer_.setTimer(this->timeToLive_, false, this, exec, false); 78 this->timer_.setTimer(this->timeToLive_, false, createExecutor(createFunctor(&DroppedItem::timerCallback, this)), false); 80 79 } 81 80 } -
code/branches/core5/src/orxonox/pickup/DroppedItem.h
r5738 r5831 77 77 BaseItem* item_; 78 78 79 Timer <DroppedItem>timer_;79 Timer timer_; 80 80 }; 81 81 } -
code/branches/core5/src/orxonox/pickup/ModifierPickup.cc
r5801 r5831 101 101 if (this->duration_ > 0.0f) 102 102 { 103 Executor Member<ModifierPickup>* executor = createExecutor(createFunctor(&ModifierPickup::timerCallback));103 Executor* executor = createExecutor(createFunctor(&ModifierPickup::timerCallback, this)); 104 104 executor->setDefaultValues(pawn); 105 this->timer_.setTimer(this->duration_, false, this,executor);105 this->timer_.setTimer(this->duration_, false, executor); 106 106 } 107 107 -
code/branches/core5/src/orxonox/pickup/ModifierPickup.h
r5738 r5831 129 129 130 130 void timerCallback(Pawn* pawn); //!< Method called when the timer runs out. 131 131 132 private: 132 133 float getAdditiveModifier(ModifierType::Value type) const; //!< Get the additive modifier for a given ModifierType. … … 138 139 std::map<ModifierType::Value, float> multiplicativeModifiers_; //!< Map of multiplicative modifiers, indexed by ModifierType. 139 140 140 float duration_; //!< Duration of this pickup's effect (0 for unlimited).141 Timer <ModifierPickup> timer_;//!< Timer used if the pickup's effect has a time limit.141 float duration_; //!< Duration of this pickup's effect (0 for unlimited). 142 Timer timer_; //!< Timer used if the pickup's effect has a time limit. 142 143 }; 143 144 } -
code/branches/core5/src/orxonox/pickup/PickupSpawner.cc
r5801 r5831 166 166 if (this->respawnTime_ > 0.0f) 167 167 { 168 ExecutorMember<PickupSpawner>* executor = createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback)); 169 this->respawnTimer_.setTimer(this->respawnTime_, false, this, executor); 168 this->respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this))); 170 169 171 170 this->setActive(false); -
code/branches/core5/src/orxonox/pickup/PickupSpawner.h
r5738 r5831 114 114 115 115 float respawnTime_; //!< Time after which this gets re-actived. 116 Timer <PickupSpawner> respawnTimer_;//!< Timer used for re-activating.116 Timer respawnTimer_; //!< Timer used for re-activating. 117 117 }; 118 118 } -
code/branches/core5/src/orxonox/weaponsystem/Munition.cc
r5738 r5831 461 461 if (bUseReloadTime && (munition->reloadTime_ > 0 || munition->bStackMunition_)) 462 462 { 463 Executor Member<Magazine>* executor = createExecutor(createFunctor(&Magazine::loaded));463 Executor* executor = createExecutor(createFunctor(&Magazine::loaded, this)); 464 464 executor->setDefaultValues(munition); 465 465 466 this->loadTimer_.setTimer(munition->reloadTime_, false, this,executor);466 this->loadTimer_.setTimer(munition->reloadTime_, false, executor); 467 467 } 468 468 else -
code/branches/core5/src/orxonox/weaponsystem/Munition.h
r5738 r5831 47 47 48 48 unsigned int munition_; 49 Timer <Magazine>loadTimer_;49 Timer loadTimer_; 50 50 bool bLoaded_; 51 51 -
code/branches/core5/src/orxonox/weaponsystem/Weapon.cc
r5801 r5831 50 50 this->reloadingWeaponmode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED; 51 51 52 this->reloadTimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&Weapon::reloaded)));52 this->reloadTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&Weapon::reloaded, this))); 53 53 this->reloadTimer_.stopTimer(); 54 54 } -
code/branches/core5/src/orxonox/weaponsystem/Weapon.h
r5738 r5831 71 71 std::multimap<unsigned int, WeaponMode*> weaponmodes_; 72 72 73 Timer <Weapon>reloadTimer_;73 Timer reloadTimer_; 74 74 bool bReloading_; 75 75 unsigned int reloadingWeaponmode_; -
code/branches/core5/src/orxonox/weaponsystem/WeaponMode.cc
r5738 r5831 57 57 this->bParallelReload_ = true; 58 58 59 this->reloadTimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&WeaponMode::reloaded)));59 this->reloadTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&WeaponMode::reloaded, this))); 60 60 this->reloadTimer_.stopTimer(); 61 61 -
code/branches/core5/src/orxonox/weaponsystem/WeaponMode.h
r5814 r5831 150 150 std::string munitionname_; 151 151 152 Timer <WeaponMode>reloadTimer_;152 Timer reloadTimer_; 153 153 bool bReloading_; 154 154 }; -
code/branches/core5/src/orxonox/worldentities/BigExplosion.cc
r5801 r5831 90 90 this->setVelocity(velocity); 91 91 92 this->destroyTimer_.setTimer(rnd(2, 4), false, this, createExecutor(createFunctor(&BigExplosion::stop)));92 this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&BigExplosion::stop, this))); 93 93 } 94 94 this->registerVariables(); … … 329 329 { 330 330 this->bStop_ = true; 331 this->destroyTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&BigExplosion::destroy)));331 this->destroyTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&BigExplosion::destroy, this))); 332 332 } 333 333 } -
code/branches/core5/src/orxonox/worldentities/BigExplosion.h
r5791 r5831 98 98 99 99 LODParticle::Value LOD_; 100 Timer <BigExplosion>destroyTimer_;100 Timer destroyTimer_; 101 101 }; 102 102 } -
code/branches/core5/src/orxonox/worldentities/ExplosionChunk.cc
r5801 r5831 79 79 this->setVelocity(velocity); 80 80 81 this->destroyTimer_.setTimer(rnd(1, 2), false, this, createExecutor(createFunctor(&ExplosionChunk::stop)));81 this->destroyTimer_.setTimer(rnd(1, 2), false, createExecutor(createFunctor(&ExplosionChunk::stop, this))); 82 82 } 83 83 … … 132 132 { 133 133 this->bStop_ = true; 134 this->destroyTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&ExplosionChunk::destroy)));134 this->destroyTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&ExplosionChunk::destroy, this))); 135 135 } 136 136 } -
code/branches/core5/src/orxonox/worldentities/ExplosionChunk.h
r5791 r5831 60 60 ParticleInterface* smoke_; 61 61 LODParticle::Value LOD_; 62 Timer <ExplosionChunk>destroyTimer_;62 Timer destroyTimer_; 63 63 }; 64 64 } -
code/branches/core5/src/orxonox/worldentities/MovableEntity.cc
r5801 r5831 98 98 void MovableEntity::clientConnected(unsigned int clientID) 99 99 { 100 this->resynchronizeTimer_.setTimer(rnd() * MAX_RESYNCHRONIZE_TIME, false, this, createExecutor(createFunctor(&MovableEntity::resynchronize)));100 this->resynchronizeTimer_.setTimer(rnd() * MAX_RESYNCHRONIZE_TIME, false, createExecutor(createFunctor(&MovableEntity::resynchronize, this))); 101 101 } 102 102 … … 110 110 { 111 111 // Resynchronise every few seconds because we only work with velocities (no positions) 112 continuousResynchroTimer_ = new Timer <MovableEntity>(CONTINUOUS_SYNCHRONIZATION_TIME + rnd(-1, 1),113 true, this, createExecutor(createFunctor(&MovableEntity::resynchronize)), false);112 continuousResynchroTimer_ = new Timer(CONTINUOUS_SYNCHRONIZATION_TIME + rnd(-1, 1), 113 true, createExecutor(createFunctor(&MovableEntity::resynchronize, this)), false); 114 114 } 115 115 -
code/branches/core5/src/orxonox/worldentities/MovableEntity.h
r5738 r5831 96 96 Quaternion overwrite_orientation_; 97 97 98 Timer <MovableEntity>resynchronizeTimer_;99 Timer <MovableEntity>* continuousResynchroTimer_;98 Timer resynchronizeTimer_; 99 Timer* continuousResynchroTimer_; 100 100 101 101 Pawn* owner_;
Note: See TracChangeset
for help on using the changeset viewer.