- Timestamp:
- Jan 4, 2016, 6:19:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15/src/modules/hover/FlagHUD.cc
r11030 r11041 36 36 #include <OgrePanelOverlayElement.h> 37 37 38 #include "util/StringUtils.h" 38 39 #include "core/CoreIncludes.h" 39 #include " core/XMLPort.h"40 #include "Hover.h" 40 41 41 42 namespace orxonox … … 47 48 RegisterObject(FlagHUD); 48 49 50 this->hoverGame_ = NULL; 49 51 this->panel_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 50 52 .createOverlayElement("Panel", "FlagHUD_Panel_" + getUniqueNumberString())); … … 54 56 this->flagCount_ = 5; 55 57 setFlagCount(5); 58 } 59 60 FlagHUD::~FlagHUD() 61 { 62 if (this->isInitialized()) 63 { 64 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->panel_); 65 } 56 66 } 57 67 … … 78 88 SUPER(FlagHUD, tick, dt); 79 89 80 setFlagCount(this->hoverGame->getFlags()); 81 90 setFlagCount(this->hoverGame_->getFlags()); 82 91 } 83 92 … … 88 97 if (this->getOwner() && this->getOwner()->getGametype()) 89 98 { 90 this->hoverGame = orxonox_cast<Hover*>(this->getOwner()->getGametype());99 this->hoverGame_ = orxonox_cast<Hover*>(this->getOwner()->getGametype()); 91 100 } 92 101 else 93 102 { 94 this->hoverGame = 0; 95 } 96 } 97 98 FlagHUD::~FlagHUD() 99 { 100 if (this->isInitialized()) 101 { 102 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->panel_); 103 this->hoverGame_ = 0; 103 104 } 104 105 }
Note: See TracChangeset
for help on using the changeset viewer.