Changeset 6512 for code/branches/pickup3/src/modules/pickup
- Timestamp:
- Mar 11, 2010, 4:30:30 PM (15 years ago)
- Location:
- code/branches/pickup3/src/modules/pickup
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3/src/modules/pickup/DroppedPickup.cc
r6475 r6512 40 40 namespace orxonox 41 41 { 42 43 CreateFactory(DroppedPickup); 44 42 45 /** 43 46 @brief … … 63 66 The distance at which the PickupSpawner triggers. Default is 10. 64 67 */ 65 DroppedPickup::DroppedPickup(BaseObject* creator, Pickupable* pickup, const Vector3& position, float triggerDistance) : PickupSpawner(creator, pickup, triggerDistance, 0, 1)68 DroppedPickup::DroppedPickup(BaseObject* creator, Pickupable* pickup, const Vector3& position, float triggerDistance) : PickupSpawner(creator, pickup, triggerDistance, 10, 1) 66 69 { 67 70 RegisterObject(DroppedPickup); … … 70 73 71 74 this->setPosition(position); 75 this->setActive(false); 76 this->startRespawnTimer(); 72 77 } 73 78 -
code/branches/pickup3/src/modules/pickup/PickupPrereqs.h
r6496 r6512 76 76 //items 77 77 class HealthPickup; 78 class TestPickup; 78 79 79 80 } -
code/branches/pickup3/src/modules/pickup/PickupRepresentation.cc
r6484 r6512 154 154 { 155 155 StaticEntity* representation = new StaticEntity(spawner); 156 //TODO: Nicer... 157 Billboard* billboard = new Billboard(spawner); 158 billboard->setColour(ColourValue(1.0, 0.0, 0.0)); 159 billboard->setMaterial("Examples/Flare"); 160 representation->attach(billboard); 156 Billboard* sphere = new Billboard(spawner); 157 sphere->setColour(ColourValue(0.95, 0.85, 0.27)); 158 sphere->setMaterial("Sphere2"); 159 sphere->setScale(0.1); 160 Billboard* icon = new Billboard(spawner); 161 icon->setColour(ColourValue(0.89, 0.79, 0.08)); 162 icon->setMaterial("Asterix"); 163 icon->setScale(0.5); 164 sphere->attach(icon); 165 representation->attach(sphere); 161 166 return representation; 162 167 } -
code/branches/pickup3/src/modules/pickup/PickupSpawner.cc
r6499 r6512 216 216 { 217 217 //TODO: Nicer? Does this even work? 218 this-> respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this)));218 this->startRespawnTimer(); 219 219 220 220 this->setActive(false); … … 227 227 this->destroy(); 228 228 } 229 } 230 231 /** 232 @brief 233 Starts the respawn timer. 234 */ 235 void PickupSpawner::startRespawnTimer(void) 236 { 237 this->respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this))); 229 238 } 230 239 -
code/branches/pickup3/src/modules/pickup/PickupSpawner.h
r6496 r6512 101 101 protected: 102 102 void decrementSpawnsRemaining(void); //!< Decrements the number of remaining spawns. 103 104 void startRespawnTimer(void); 103 105 104 106 virtual Pickupable* getPickup(void); //!< Creates a new Pickupable. -
code/branches/pickup3/src/modules/pickup/items/CMakeLists.txt
r6474 r6512 1 1 ADD_SOURCE_FILES(PICKUP_SRC_FILES 2 2 HealthPickup.cc 3 TestPickup.cc 3 4 )
Note: See TracChangeset
for help on using the changeset viewer.