Changeset 5813 for code/branches/core5/src/orxonox/Radar.cc
- Timestamp:
- Sep 27, 2009, 7:28:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/Radar.cc
r5785 r5813 43 43 namespace orxonox 44 44 { 45 SetConsoleCommand(Radar, cycleNavigationFocus, true).accessLevel(AccessLevel::User);46 SetConsoleCommand(Radar, releaseNavigationFocus, true).accessLevel(AccessLevel::User);47 48 Radar* Radar::instance_s = 0;49 45 50 46 Radar::Radar() … … 52 48 , objectTypeCounter_(0) 53 49 { 54 assert(instance_s == 0);55 instance_s = this;56 57 50 // TODO: make this mapping configurable. Maybe there's a possibility with self configured 58 51 // configValues.. … … 79 72 Radar::~Radar() 80 73 { 81 instance_s = 0;82 74 } 83 75 … … 194 186 } 195 187 } 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 }219 188 }
Note: See TracChangeset
for help on using the changeset viewer.