- Timestamp:
- May 4, 2017, 3:17:59 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOB.cc
r11405 r11412 38 38 #include "core/command/Executor.h" 39 39 #include "core/config/ConfigValueIncludes.h" 40 #include "core/Game.h" 40 41 41 42 #include "gamestates/GSLevel.h" … … 68 69 points_=0; 69 70 timeLeft_=400.0; 71 72 lvl_ = 1; 70 73 71 74 } … … 86 89 } 87 90 88 91 void SOB::start() 89 92 { 90 93 if (center_ != nullptr) // There needs to be a SOBCenterpoint, i.e. the area the game takes place. … … 125 128 } 126 129 130 void SOB::restart() { 131 cleanup(); 132 133 // HACK 134 Game::getInstance().popState(); 135 Game::getInstance().popState(); 136 Game::getInstance().requestStates("standalone, level"); 137 138 139 } 127 140 void SOB::spawnPlayer(PlayerInfo* player) 128 141 { … … 148 161 } 149 162 150 void SOB::tick(float dt)163 void SOB::tick(float dt) 151 164 { 152 165 SUPER(SOB, tick, dt); 153 166 154 if (this->figure_ != nullptr && figure_->dead_) 167 if (this->figure_ != nullptr && figure_->dead_) { 168 info_ = "Game over. Press <Space> to restart"; 155 169 orxout() << "DEED" << endl; 156 170 } 171 157 172 158 timeLeft_-=dt*2.5;173 timeLeft_-=dt*2.5; 159 174 } 160 175
Note: See TracChangeset
for help on using the changeset viewer.