- Timestamp:
- Dec 17, 2008, 8:00:43 AM (16 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
/code/branches/pickups2 (added) merged: 2110,2136,2202,2227,2289-2290,2293-2294,2324,2342,2389,2397
- Property svn:mergeinfo changed
-
code/branches/presentation/src/orxonox/objects/pickup/PickupSpawner.cc
- Property svn:eol-style set to native
r2498 r2500 1 1 #include "PickupSpawner.h" 2 #include " Item.h"2 #include "BaseItem.h" 3 3 #include "objects/worldentities/pawns/Pawn.h" 4 4 #include "objects/worldentities/triggers/DistanceTrigger.h" … … 11 11 CreateFactory(PickupSpawner); 12 12 13 PickupSpawner::PickupSpawner(BaseObject* creator) : PositionableEntity(creator)13 PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator) 14 14 { 15 15 RegisterObject(PickupSpawner); … … 31 31 XMLPortParam(PickupSpawner, "distance", setDistance, getDistance, xmlelement, mode).defaultValues(20.0f); 32 32 XMLPortParam(PickupSpawner, "respawntimer", setRespawnTimer, getRespawnTimer, xmlelement, mode); 33 33 34 34 } 35 35 … … 58 58 { 59 59 COUT(0) << "ITEM PICKED UP" << std::endl; 60 //if(player->isA(itemtemplate_->getPlayerBaseClass())) 60 //if(player->isA(itemtemplate_->getPlayerBaseClass())) 61 61 { 62 62 BaseObject* newobject = this->template_->getBaseclassIdentifier()->fabricate(this); 63 Item* newitem = dynamic_cast<Item*>(newobject);63 BaseItem* newitem = dynamic_cast<BaseItem*>(newobject); 64 64 if (newitem) 65 65 { … … 71 71 this->setActive(false); 72 72 this->fireEvent(); 73 } 73 } 74 74 else 75 75 delete newobject; … … 82 82 83 83 void PickupSpawner::triggerRespawnTimer() 84 { 85 84 { 85 86 86 if(respawntimer_!=0) 87 87 { … … 90 90 RespawnTimer_.setTimer(this->respawntimer_, false, (BaseObject*)this, executor); 91 91 COUT(0) << "TIMER SET" << std::endl; 92 } 92 } 93 93 } 94 94 void PickupSpawner::changedActivity() … … 106 106 COUT(0) << "INvisble!" << std::endl; 107 107 } 108 108 109 109 */ 110 110 SUPER(PickupSpawner, changedActivity);
Note: See TracChangeset
for help on using the changeset viewer.