Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 10, 2018, 3:36:53 PM (6 years ago)
Author:
merholzl
Message:

added space race improvements

Location:
code/branches/mergeFS18
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/mergeFS18

  • code/branches/mergeFS18/src/modules/gametypes/SpaceRace.h

    r11720 r12029  
    4242#include "SpaceRaceManager.h"
    4343
     44
    4445namespace orxonox
    4546{
     
    5455
    5556        public:
    56             SpaceRace(Context* context);
     57            SpaceRace(Context* context);//, SpaceRace* parentRace);
    5758            virtual ~SpaceRace() {}
    5859
     
    6061            virtual void end() override;
    6162            virtual void countdownFinished();
     63           
    6264            virtual void addBots(unsigned int amount) override; //<! overwrite function in order to bypass the addbots command.
     65            virtual void tick(float dt) override;
     66            virtual void startmessage(int second);
    6367
    6468
     
    7983            inline Clock& getClock()
    8084                { return this->clock_; }
     85            //inline void setParentRace(SpaceRace* parentRace) { this->parentRace = parentRace; }
    8186
    8287            virtual bool allowPawnHit(Pawn* victim, Pawn* originator) override;
    8388            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator) override;
    8489            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator) override;
     90            bool countdown_mode = false;
     91            float time_passed = 11.0f;
     92           
     93            bool bLost=false;
    8594
    8695        private:
    8796            bool cantMove_;                                            ///< Helper variable, used to stall the engines before the race starts.
    8897            std::map<PlayerInfo*, RaceCheckPoint*> checkpointReached_; ///< The number of the last check point reached by each player.
    89             bool bTimeIsUp_;                                           ///< True if one of the check points is reached too late.
     98            bool bTimeIsUp_;    ///< True if one of the check points is reached too late.
    9099
    91100            Clock clock_; ///< The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late.
Note: See TracChangeset for help on using the changeset viewer.