Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 21, 2013, 3:53:13 PM (11 years ago)
Author:
zifloria
Message:

InvaderShip created

Location:
code/branches/invaders/src/modules/invader
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/invaders/src/modules/invader/CMakeLists.txt

    r9702 r9709  
    22BUILD_UNIT InvaderBuildUnit.cc
    33  Invader.cc
     4  InvaderCenterPoint.cc
     5  InvaderShip.cc
    46END_BUILD_UNIT
    57)
  • code/branches/invaders/src/modules/invader/Invader.cc

    r9702 r9709  
    4242#include "chat/ChatManager.h"
    4343
     44#include "InvaderShip.h"
     45// ! HACK
     46#include "infos/PlayerInfo.h"
     47
     48#include "InvaderCenterPoint.h"
     49
    4450namespace orxonox
    4551{
     
    5056        RegisterObject(Invader);
    5157
     58        this->center_ = 0;
     59        //this->context = context;
    5260    }
    5361
     
    5664    }
    5765
     66    // inject custom player controller
     67 /**   void Invader::spawnPlayer(PlayerInfo* player)
     68    {
     69        assert(player);
     70
     71        //player->startControl(new InvaderShip(this->center_->getContext() ) );
     72    }*/
     73
    5874    void Invader::start()
    5975    {
     
    6177        this->bForceSpawn_ = true;
    6278
     79        if (this->center_ == NULL)  // abandon mission!
     80        {
     81            orxout(internal_error) << "Invader: No Centerpoint specified." << endl;
     82            GSLevel::startMainMenu();
     83            return;
     84        }
    6385        // Call start for the parent class.
    6486        Deathmatch::start();
  • code/branches/invaders/src/modules/invader/Invader.h

    r9702 r9709  
    4040#include "gametypes/Deathmatch.h"
    4141
     42#include "InvaderCenterPoint.h"
     43
    4244namespace orxonox
    4345{
     
    5153            virtual void start(); //!< Starts the Invader minigame.
    5254            virtual void end(); ///!< Ends the Invader minigame.
     55
     56            //virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
     57
     58            void setCenterpoint(InvaderCenterPoint* center)
     59            { this->center_ = center; }
     60        private:
     61            WeakPtr<InvaderCenterPoint> center_;
     62            //Context* context;
    5363    };
    5464}
  • code/branches/invaders/src/modules/invader/InvaderPrereqs.h

    r9702 r9709  
    6969{
    7070    class Invader;
     71    class InvaderCenterPoint;
     72    class InvaderShip;
    7173}
    7274
Note: See TracChangeset for help on using the changeset viewer.