Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 9, 2013, 9:26:46 PM (11 years ago)
Author:
landauf
Message:

BaseObject now requires a Context instead of a creator (BaseObject*) in its constructor.
Namespace, Level, and Scene inherit from Context

Location:
code/branches/core6/src/orxonox/worldentities/pawns
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/orxonox/worldentities/pawns/Destroyer.cc

    r5929 r9629  
    3636    CreateFactory(Destroyer);
    3737
    38     Destroyer::Destroyer(BaseObject* creator) : SpaceShip(creator)
     38    Destroyer::Destroyer(Context* context) : SpaceShip(context)
    3939    {
    4040        RegisterObject(Destroyer);
  • code/branches/core6/src/orxonox/worldentities/pawns/Destroyer.h

    r5781 r9629  
    3939    {
    4040        public:
    41             Destroyer(BaseObject* creator);
     41            Destroyer(Context* context);
    4242            virtual ~Destroyer() {};
    4343
  • code/branches/core6/src/orxonox/worldentities/pawns/FpsPlayer.cc

    r9558 r9629  
    5555    CreateFactory(FpsPlayer);
    5656
    57     FpsPlayer::FpsPlayer(BaseObject* creator) : Pawn(creator)
     57    FpsPlayer::FpsPlayer(Context* context) : Pawn(context)
    5858    {
    5959        RegisterObject(FpsPlayer);
  • code/branches/core6/src/orxonox/worldentities/pawns/FpsPlayer.h

    r9016 r9629  
    4343    {
    4444        public:
    45             FpsPlayer(BaseObject* creator);
     45            FpsPlayer(Context* context);
    4646            virtual ~FpsPlayer();
    4747
  • code/branches/core6/src/orxonox/worldentities/pawns/Pawn.cc

    r9554 r9629  
    5151    CreateFactory(Pawn);
    5252
    53     Pawn::Pawn(BaseObject* creator)
    54         : ControllableEntity(creator)
    55         , RadarViewable(creator, static_cast<WorldEntity*>(this))
     53    Pawn::Pawn(Context* context)
     54        : ControllableEntity(context)
     55        , RadarViewable(this, static_cast<WorldEntity*>(this))
    5656    {
    5757        RegisterObject(Pawn);
     
    8484        if (GameMode::isMaster())
    8585        {
    86             this->weaponSystem_ = new WeaponSystem(this);
     86            this->weaponSystem_ = new WeaponSystem(this->getContext());
    8787            this->weaponSystem_->setPawn(this);
    8888        }
     
    297297        if (!this->spawnparticlesource_.empty())
    298298        {
    299             ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
     299            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
    300300            effect->setPosition(this->getPosition());
    301301            effect->setOrientation(this->getOrientation());
     
    334334        this->setDestroyWhenPlayerLeft(false);
    335335
    336         BigExplosion* chunk = new BigExplosion(this->getCreator());
     336        BigExplosion* chunk = new BigExplosion(this->getContext());
    337337        chunk->setPosition(this->getPosition());
    338338
     
    342342        // play death effect
    343343        {
    344             ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
     344            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
    345345            effect->setPosition(this->getPosition());
    346346            effect->setOrientation(this->getOrientation());
     
    350350        }
    351351        {
    352             ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
     352            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
    353353            effect->setPosition(this->getPosition());
    354354            effect->setOrientation(this->getOrientation());
     
    358358        }
    359359        {
    360             ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
     360            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
    361361            effect->setPosition(this->getPosition());
    362362            effect->setOrientation(this->getOrientation());
     
    367367        for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)
    368368        {
    369             ExplosionChunk* chunk = new ExplosionChunk(this->getCreator());
     369            ExplosionChunk* chunk = new ExplosionChunk(this->getContext());
    370370            chunk->setPosition(this->getPosition());
    371371        }
  • code/branches/core6/src/orxonox/worldentities/pawns/Pawn.h

    r9348 r9629  
    4545
    4646        public:
    47             Pawn(BaseObject* creator);
     47            Pawn(Context* context);
    4848            virtual ~Pawn();
    4949
  • code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.cc

    r9589 r9629  
    4848    CreateFactory(SpaceShip);
    4949
    50     SpaceShip::SpaceShip(BaseObject* creator) : Pawn(creator), boostBlur_(NULL)
     50    SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(NULL)
    5151    {
    5252        RegisterObject(SpaceShip);
  • code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.h

    r8727 r9629  
    8888    {
    8989        public:
    90             SpaceShip(BaseObject* creator);
     90            SpaceShip(Context* context);
    9191            virtual ~SpaceShip();
    9292
  • code/branches/core6/src/orxonox/worldentities/pawns/Spectator.cc

    r9558 r9629  
    4747    CreateFactory(Spectator);
    4848
    49     Spectator::Spectator(BaseObject* creator) : ControllableEntity(creator)
     49    Spectator::Spectator(Context* context) : ControllableEntity(context)
    5050    {
    5151        RegisterObject(Spectator);
  • code/branches/core6/src/orxonox/worldentities/pawns/Spectator.h

    r7862 r9629  
    4040    {
    4141        public:
    42             Spectator(BaseObject* creator);
     42            Spectator(Context* context);
    4343            virtual ~Spectator();
    4444
  • code/branches/core6/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc

    r5929 r9629  
    3939    CreateFactory(TeamBaseMatchBase);
    4040
    41     TeamBaseMatchBase::TeamBaseMatchBase(BaseObject* creator) : Pawn(creator)
     41    TeamBaseMatchBase::TeamBaseMatchBase(Context* context) : Pawn(context)
    4242    {
    4343        RegisterObject(TeamBaseMatchBase);
  • code/branches/core6/src/orxonox/worldentities/pawns/TeamBaseMatchBase.h

    r5781 r9629  
    5050    {
    5151        public:
    52             TeamBaseMatchBase(BaseObject* creator);
     52            TeamBaseMatchBase(Context* context);
    5353
    5454            // if class closes, close everything
Note: See TracChangeset for help on using the changeset viewer.