Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2008, 8:00:43 AM (16 years ago)
Author:
landauf
Message:

merged pickups2 to presentation

Location:
code/branches/presentation
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/objects/pickup/PickupSpawner.cc

    • Property svn:eol-style set to native
    r2498 r2500  
    11#include "PickupSpawner.h"
    2 #include "Item.h"
     2#include "BaseItem.h"
    33#include "objects/worldentities/pawns/Pawn.h"
    44#include "objects/worldentities/triggers/DistanceTrigger.h"
     
    1111CreateFactory(PickupSpawner);
    1212
    13 PickupSpawner::PickupSpawner(BaseObject* creator) : PositionableEntity(creator)
     13PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator)
    1414{
    1515        RegisterObject(PickupSpawner);
     
    3131        XMLPortParam(PickupSpawner, "distance", setDistance, getDistance, xmlelement, mode).defaultValues(20.0f);
    3232        XMLPortParam(PickupSpawner, "respawntimer", setRespawnTimer, getRespawnTimer, xmlelement, mode);
    33        
     33
    3434}
    3535
     
    5858        {
    5959                COUT(0) << "ITEM PICKED UP" << std::endl;
    60                 //if(player->isA(itemtemplate_->getPlayerBaseClass())) 
     60                //if(player->isA(itemtemplate_->getPlayerBaseClass()))
    6161                {
    6262                BaseObject* newobject = this->template_->getBaseclassIdentifier()->fabricate(this);
    63                 Item* newitem = dynamic_cast<Item*>(newobject);
     63                BaseItem* newitem = dynamic_cast<BaseItem*>(newobject);
    6464                if (newitem)
    6565                {
     
    7171                                this->setActive(false);
    7272                                this->fireEvent();
    73                         }       
     73                        }
    7474                        else
    7575                                delete newobject;
     
    8282
    8383void PickupSpawner::triggerRespawnTimer()
    84 {       
    85        
     84{
     85
    8686        if(respawntimer_!=0)
    8787        {
     
    9090                RespawnTimer_.setTimer(this->respawntimer_, false, (BaseObject*)this, executor);
    9191                COUT(0) << "TIMER SET" << std::endl;
    92         }       
     92        }
    9393}
    9494void PickupSpawner::changedActivity()
     
    106106                COUT(0) << "INvisble!" << std::endl;
    107107        }
    108                
     108
    109109*/
    110110        SUPER(PickupSpawner, changedActivity);
Note: See TracChangeset for help on using the changeset viewer.