Changeset 10900
- Timestamp:
- Nov 30, 2015, 4:38:28 PM (9 years ago)
- Location:
- code/branches/hoverHS15
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hoverHS15/data/overlays/HoverHUD.oxo
r10895 r10900 8 8 <OverlayGroup name = "spaceshiphoverhud" scale = "1, 1"> 9 9 <TimeHUD 10 name = "Timer "10 name = "TimerHUD" 11 11 position = "0.95, 0.02" 12 12 pickpoint = "0.0, 0.0" … … 18 18 19 19 <FlagHUD 20 name = "FlagHUD" 20 21 position = "0.05, 0.02" 21 22 size = "0.18, 0.05" -
code/branches/hoverHS15/src/modules/hover/FlagHUD.cc
r10895 r10900 52 52 53 53 void FlagHUD::setFlagCount(int flagCount) { 54 if(flagCount == 0){ 55 this->panel_->hide(); 56 return; 57 } 54 58 this->panel_->setDimensions( 55 59 this->panel_->_getRelativeWidth() / ((float) flagCount_) * ((float) flagCount), … … 61 65 } 62 66 63 /*void FlagHUD::tick(float dt)67 void FlagHUD::tick(float dt) 64 68 { 65 69 SUPER(FlagHUD, tick, dt); 66 70 67 if (this->hoverGame) 68 { 69 setFlagCount(2); 70 } 71 }*/ 71 setFlagCount(this->hoverGame->getFlags()); 72 73 } 72 74 73 75 void FlagHUD::changedOwner() -
code/branches/hoverHS15/src/modules/hover/FlagHUD.h
r10895 r10900 38 38 namespace orxonox 39 39 { 40 class _OverlaysExport FlagHUD : public OrxonoxOverlay //, public Tickable40 class _OverlaysExport FlagHUD : public OrxonoxOverlay , public Tickable 41 41 { 42 42 public: … … 44 44 virtual ~FlagHUD(); 45 45 46 //virtual void tick(float dt);46 virtual void tick(float dt); 47 47 virtual void changedOwner(); 48 48 -
code/branches/hoverHS15/src/modules/hover/Hover.cc
r10895 r10900 116 116 if(firstTick) 117 117 { 118 118 119 std::fill( g_Maze, g_Maze + NumCells * NumCells, 0 ); 119 120 g_PtX=0; … … 143 144 for ( int i = 0; i < 5; i++ ) 144 145 flagVector.push_back(new HoverFlag(origin_->getContext(), rand()%10, rand()%10)); 146 147 Flags_ = flagVector.size(); 145 148 146 149 //new HoverFlag(origin_->getContext()); //Rechts in Y Richtung … … 154 157 } 155 158 } 156 157 158 159 } 160 161 159 Flags_ = flagVector.size(); 160 161 162 163 } 164 165 int Hover::getFlags() 166 { 167 168 // Call start for the parent class. 169 return Flags_; 170 } 162 171 163 172 void Hover::start() -
code/branches/hoverHS15/src/modules/hover/Hover.h
r10894 r10900 88 88 { this->origin_ = origin; } 89 89 90 90 int getFlags(); 91 91 WeakPtr<HoverOrigin> origin_; 92 92 … … 95 95 int RandomInt(); 96 96 int RandomInt4(); 97 97 int Flags_; 98 98 99 99 bool IsDirValid( eDirection Dir ); -
code/branches/hoverHS15/src/modules/hover/TimeHUD.cc
r10895 r10900 43 43 this->_running = false; 44 44 this->hoverGame = 0; 45 setRunning(true); 45 46 } 46 47 … … 82 83 this->setCaption(getTimeString(this->_time)); 83 84 } 85 if(this->hoverGame->getFlags() == 0) 86 setRunning(false); 84 87 85 88 }
Note: See TracChangeset
for help on using the changeset viewer.