Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/invader/CMakeLists.txt

    r9958 r10624  
    1313
    1414ORXONOX_ADD_LIBRARY(invader
    15   MODULE
     15  PLUGIN
    1616  FIND_HEADER_FILES
    1717  LINK_LIBRARIES
  • code/trunk/src/modules/invader/Invader.cc

    r9961 r10624  
    6262        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    6363        this->center_ = 0;
    64         init();
    65         this->setHUDTemplate("InvaderHUD");
    66     }
    67 
    68     void Invader::init()
    69     {
    7064        bEndGame = false;
    7165        lives = 3;
     
    7872        enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&Invader::spawnEnemy, this)));
    7973        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&Invader::comboControll, this)));
     74        this->setHUDTemplate("InvaderHUD");
    8075    }
    8176
     
    8782            for (int i = 0; i < 7; i++)
    8883            {
    89                 WeakPtr<BigExplosion> chunk = new BigExplosion(this->center_->getContext());
     84                BigExplosion* chunk = new BigExplosion(this->center_->getContext());
    9085                chunk->setPosition(Vector3(600, 0, 100.f * i - 300));
    9186                chunk->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
     
    9994    }
    10095
    101     WeakPtr<InvaderShip> Invader::getPlayer()
     96    InvaderShip* Invader::getPlayer()
    10297    {
    10398        if (player == NULL)
     
    116111        for (int i = 0; i < (3*log10(static_cast<double>(level)) + 1); i++)
    117112        {
    118             WeakPtr<InvaderEnemy> newPawn;
     113            InvaderEnemy* newPawn;
    119114            if (rand() % 42/(1 + level*level) == 0)
    120115            {
     
    155150    void Invader::start()
    156151    {
    157         init();
    158152        // Set variable to temporarily force the player to spawn.
    159153        this->bForceSpawn_ = true;
  • code/trunk/src/modules/invader/Invader.h

    r9943 r10624  
    7171            // checks if multiplier should be reset.
    7272            void comboControll();
    73             void init();
    7473            int lives;
    7574            int multiplier;
     
    7877        private:
    7978            void toggleShowLevel(){bShowLevel = !bShowLevel;}
    80             WeakPtr<InvaderShip> getPlayer();
     79            InvaderShip* getPlayer();
    8180            WeakPtr<InvaderCenterPoint> center_;
    8281            WeakPtr<InvaderShip> player;
  • code/trunk/src/modules/invader/InvaderCenterPoint.cc

    r9943 r10624  
    5454    }
    5555
    56     void InvaderCenterPoint::changedGametype()
    57     {
    58         SUPER(InvaderCenterPoint, changedGametype);
    59 
    60         // Check, whether it's still Invader.
    61         this->checkGametype();
    62     }
    63 
    6456    void InvaderCenterPoint::checkGametype()
    6557    {
    6658        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
    6759        {
    68             Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype().get());
     60            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
    6961            InvaderGametype->setCenterpoint(this);
    7062        }
  • code/trunk/src/modules/invader/InvaderCenterPoint.h

    r9943 r10624  
    4949            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5050
    51             virtual void changedGametype(); //!< Is called when the gametype has changed.
    5251        private:
    5352            void checkGametype();
  • code/trunk/src/modules/invader/InvaderEnemy.cc

    r9961 r10624  
    6969    }
    7070
    71     WeakPtr<Invader> InvaderEnemy::getGame()
     71    Invader* InvaderEnemy::getGame()
    7272    {
    7373        if (game == NULL)
  • code/trunk/src/modules/invader/InvaderEnemy.h

    r9943 r10624  
    4949            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    5050            virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator);
    51             virtual void setPlayer(WeakPtr<InvaderShip> player){this->player = player;}
     51            virtual void setPlayer(InvaderShip* player){this->player = player;}
    5252
    5353            int level;
    5454        protected:
    55             WeakPtr<Invader> getGame();
     55            Invader* getGame();
    5656            WeakPtr<Invader> game;
    5757            WeakPtr<InvaderShip> player;
  • code/trunk/src/modules/invader/InvaderHUDinfo.cc

    r9961 r10624  
    128128        if (this->getOwner() && this->getOwner()->getGametype())
    129129        {
    130             this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype().get());
     130            this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype());
    131131        }
    132132        else
  • code/trunk/src/modules/invader/InvaderShip.cc

    r9943 r10624  
    9191
    9292        // Camera
    93         WeakPtr<Camera> camera = this->getCamera();
     93        Camera* camera = this->getCamera();
    9494        if (camera != NULL)
    9595        {
     
    142142    {
    143143        // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
    144         WeakPtr<InvaderEnemy> enemy = orxonox_cast<InvaderEnemy*>(otherObject);
    145         WeakPtr<Projectile> shot = orxonox_cast<Projectile*>(otherObject);
     144        InvaderEnemy* enemy = orxonox_cast<InvaderEnemy*>(otherObject);
     145        Projectile* shot = orxonox_cast<Projectile*>(otherObject);
    146146        // ensure that this gets only called once per enemy.
    147147        if (enemy != NULL && lastEnemy != enemy)
     
    171171    }
    172172
    173     WeakPtr<Invader> InvaderShip::getGame()
     173    Invader* InvaderShip::getGame()
    174174    {
    175175        if (game == NULL)
  • code/trunk/src/modules/invader/InvaderShip.h

    r9943 r10624  
    7070            virtual void death();
    7171        private:
    72             WeakPtr<Invader> getGame();
     72            Invader* getGame();
    7373            WeakPtr<Invader> game;
    7474            Camera* camera;
  • code/trunk/src/modules/invader/InvaderWeapon.cc

    r10216 r10624  
    6868        // Create the projectile.projectile
    6969        projectile = new Projectile(this->getContext());
    70         WeakPtr<Model> model = new Model(projectile->getContext());
     70        Model* model = new Model(projectile->getContext());
    7171        model->setMeshSource(mesh_);
    7272        model->setCastShadows(false);
Note: See TracChangeset for help on using the changeset viewer.