Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 12, 2008, 12:56:15 AM (16 years ago)
Author:
rgrieder
Message:

Moved instantiation of stats overlay from GSLevel to Gametype.

Location:
code/branches/overlay/src/orxonox/objects/gametypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/overlay/src/orxonox/objects/gametypes/Gametype.cc

    r2087 r2181  
    3434
    3535#include "core/CoreIncludes.h"
     36#include "core/ConfigValueIncludes.h"
     37#include "core/Loader.h"
     38#include "core/XMLFile.h"
    3639#include "objects/infos/PlayerInfo.h"
    3740#include "objects/worldentities/pawns/Spectator.h"
     
    5861        this->startCountdown_ = 0;
    5962        this->bStartCountdownRunning_ = false;
     63
     64        this->statsOverlay_ = 0;
     65
     66        setConfigValues();
     67
     68        // load the corresponding score board
     69        statsOverlay_ = new XMLFile(Settings::getDataPath() + "overlay/" + this->statsOverlayName_);
     70        Loader::open(statsOverlay_);
     71    }
     72
     73    void Gametype::setConfigValues()
     74    {
     75        SetConfigValue(statsOverlayName_, "stats.oxo");
    6076    }
    6177
  • code/branches/overlay/src/orxonox/objects/gametypes/Gametype.h

    r2087 r2181  
    4444    {
    4545        friend class PlayerInfo;
     46        friend class ClassIdentifier<Gametype>;
    4647
    4748        public:
     
    8283
    8384        private:
     85            void setConfigValues();
     86
    8487            virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
    8588
     
    105108            std::set<SpawnPoint*> spawnpoints_;
    106109            SubclassIdentifier<ControllableEntity> defaultControllableEntity_;
     110
     111            XMLFile* statsOverlay_;
     112
     113            // Config Values
     114            std::string statsOverlayName_;
    107115    };
    108116}
Note: See TracChangeset for help on using the changeset viewer.