Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 18, 2011, 2:14:17 PM (14 years ago)
Author:
msalomon
Message:

Last changes to the SpaceRace game type.

Location:
code/branches/spacerace/src/modules/gametypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/spacerace/src/modules/gametypes/SpaceRace.cc

    r8182 r8250  
    2121 *
    2222 *   Author:
    23  *      Aurelian Jaggi
     23 *     Mauro Salomon
    2424 *   Co-authors:
    2525 *      ...
     
    3232#include "network/Host.h"
    3333
    34 namespace orxonox{
     34namespace orxonox
     35{
    3536    CreateUnloadableFactory(SpaceRace);
    3637   
     
    3839    {
    3940        RegisterObject(SpaceRace);
    40         this->numberOfCheckpoints_ = 0;
    4141        this->checkpointsReached_ = 0;
    4242        this->numberOfBots_ = 0;       
  • code/branches/spacerace/src/modules/gametypes/SpaceRace.h

    r8182 r8250  
    2121 *
    2222 *   Author:
    23  *      Aurelian Jaggi
     23 *      Mauro Salomon
    2424 *   Co-authors:
    2525 *      ...
     
    3232#include "gametypes/Gametype.h"
    3333#include "gametypes/GametypesPrereqs.h"
    34 #include "objects/triggers/DistanceTriggerBeacon.h"
     34#include "RaceCheckPoint.h"
    3535#include <boost/concept_check.hpp>
    3636
     
    4545            virtual void tick(float dt);
    4646           
    47             virtual void start();
    48             virtual void end();
     47            inline void newCheckpointReached()
     48                { this->checkpointsReached_++; }
     49            inline void setCheckpointsReached(int n)
     50                { this->checkpointsReached_ = n;}
     51            inline int getCheckpointsReached()
     52                { return this->checkpointsReached_; }
    4953           
    5054        protected:
    51             inline void newCheckpointReached()
    52               { this->checkpointsReached++; }
    53             inline bool lastCheckpointReached()
    54               { return (this->checkpointsReached == this->numberOfCheckpoints); }
     55           
    5556        private:
    56             int numberOfCheckpoints_;
    5757            int checkpointsReached_;
    58    
    5958    };
    6059}
Note: See TracChangeset for help on using the changeset viewer.