Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 27, 2009, 7:28:09 PM (15 years ago)
Author:
rgrieder
Message:

Moved Radar Management from GSLevel to Scene.

Location:
code/branches/core5/src/modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/gamestates/GSLevel.cc

    r5806 r5813  
    4848
    4949#include "tools/interfaces/Tickable.h"
    50 #include "Radar.h"
    5150#include "CameraManager.h"
    5251#include "LevelManager.h"
     
    6766        , guiMouseOnlyInputState_(0)
    6867        , guiKeysOnlyInputState_(0)
    69         , radar_(0)
    7068        , cameraManager_(0)
    7169    {
     
    104102            // create the global CameraManager
    105103            this->cameraManager_ = new CameraManager(GraphicsManager::getInstance().getViewport());
    106 
    107             // Start the Radar
    108             this->radar_ = new Radar();
    109104        }
    110105
     
    186181        if (GameMode::isMaster())
    187182            this->unloadLevel();
    188 
    189         if (this->radar_)
    190         {
    191             this->radar_->destroy();
    192             this->radar_ = 0;
    193         }
    194183
    195184        if (this->cameraManager_)
  • code/branches/core5/src/modules/gamestates/GSLevel.h

    r5738 r5813  
    6767        InputState*              guiMouseOnlyInputState_;  //!< input state if we only need the mouse to use the GUI
    6868        InputState*              guiKeysOnlyInputState_;   //!< input state if we only need the keys to use the GUI
    69         Radar*                   radar_;                   //!< represents the Radar (not the HUD part)
    7069        CameraManager*           cameraManager_;           //!< camera manager for this level
    7170        PlayerManager*           playerManager_;           //!< player manager for this level
  • code/branches/core5/src/modules/overlays/hud/HUDNavigation.cc

    r5738 r5813  
    3939#include "core/CoreIncludes.h"
    4040#include "core/XMLPort.h"
     41#include "Scene.h"
    4142#include "Radar.h"
    4243
     
    130131        SUPER(HUDNavigation, tick, dt);
    131132
    132         if (!Radar::getInstance().getFocus())
     133        // Get radar
     134        Radar* radar = this->getOwner()->getScene()->getRadar();
     135
     136        if (!radar->getFocus())
    133137        {
    134138            this->overlay_->hide();
     
    150154*/
    151155        // transform to screen coordinates
    152         Vector3 pos = /*transformationMatrix * */Radar::getInstance().getFocus()->getRVWorldPosition();
     156        Vector3 pos = /*transformationMatrix * */radar->getFocus()->getRVWorldPosition();
    153157
    154158        bool outOfView;
Note: See TracChangeset for help on using the changeset viewer.