Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2008, 10:54:26 PM (15 years ago)
Author:
landauf
Message:
  • Moved some variables from Gametype to GametypeInfo (Gametype exists only on the Server while GametypeInfo is synchronized)
  • Created a new HUD-element, GametypeStatus, based on GametypeInfo (the same effect was formerly achieved by using a hack in Spectator and a TextOverlay)
  • HumanController creates a HUD (additionally to the SpaceShips HUD) which includes GametypeStatus and ChatOverlay and even more in the future
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/gametypes/Gametype.h

    r2171 r2428  
    3838#include "objects/worldentities/ControllableEntity.h"
    3939#include "objects/Tickable.h"
     40#include "objects/infos/GametypeInfo.h"
    4041
    4142namespace orxonox
     
    6061            virtual ~Gametype() {}
    6162
     63            void setConfigValues();
     64
    6265            virtual void tick(float dt);
    6366
     67            inline const GametypeInfo* getGametypeInfo() const
     68                { return &this->gtinfo_; }
     69
    6470            inline bool hasStarted() const
    65                 { return this->bStarted_; }
     71                { return this->gtinfo_.bStarted_; }
    6672            inline bool hasEnded() const
    67                 { return this->bEnded_; }
     73                { return this->gtinfo_.bEnded_; }
    6874
    6975            virtual void start();
     
    8894
    8995            inline bool isStartCountdownRunning() const
    90                 { return this->bStartCountdownRunning_; }
     96                { return this->gtinfo_.bStartCountdownRunning_; }
    9197            inline float getStartCountdown() const
    92                 { return this->startCountdown_; }
     98                { return this->gtinfo_.startCountdown_; }
    9399
    94100        private:
     
    104110            void spawnDeadPlayersIfRequested();
    105111
    106             bool bStarted_;
    107             bool bEnded_;
     112            GametypeInfo gtinfo_;
     113
    108114            bool bAutoStart_;
    109115            bool bForceSpawn_;
    110116
    111117            float initialStartCountdown_;
    112             float startCountdown_;
    113             bool bStartCountdownRunning_;
    114118
    115119            std::map<PlayerInfo*, PlayerState::Enum> players_;
Note: See TracChangeset for help on using the changeset viewer.