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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/Radar.cc

    r5785 r5813  
    4343namespace orxonox
    4444{
    45     SetConsoleCommand(Radar, cycleNavigationFocus, true).accessLevel(AccessLevel::User);
    46     SetConsoleCommand(Radar, releaseNavigationFocus, true).accessLevel(AccessLevel::User);
    47 
    48     Radar* Radar::instance_s = 0;
    4945
    5046    Radar::Radar()
     
    5248        , objectTypeCounter_(0)
    5349    {
    54         assert(instance_s == 0);
    55         instance_s = this;
    56 
    5750        // TODO: make this mapping configurable. Maybe there's a possibility with self configured
    5851        //       configValues..
     
    7972    Radar::~Radar()
    8073    {
    81         instance_s = 0;
    8274    }
    8375
     
    194186        }
    195187    }
    196 
    197 
    198     /*static*/ Radar& Radar::getInstance()
    199     {
    200         assert(instance_s);
    201         return *instance_s;
    202     }
    203 
    204     /*static*/ void Radar::cycleNavigationFocus()
    205     {
    206         // avoid using getInstance because of the assert().
    207         // User might call this fuction even if HUDNavigation doesn't exist.
    208         if (instance_s)
    209             instance_s->cycleFocus();
    210     }
    211 
    212     /*static*/ void Radar::releaseNavigationFocus()
    213     {
    214         // avoid using getInstance because of the assert().
    215         // User might call this fuction even if HUDNavigation doesn't exist.
    216         if (instance_s)
    217             instance_s->releaseFocus();
    218     }
    219188}
Note: See TracChangeset for help on using the changeset viewer.