- Timestamp:
- Dec 9, 2017, 1:29:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc
r11643 r11645 98 98 { 99 99 100 orxout() << "touched" << endl;101 100 Asteroids2DStone* stone = orxonox_cast<Asteroids2DStone*>(otherObject); 102 if(stone != nullptr && (stone != lastStone || lastStone == nullptr))101 if(stone != nullptr && !bImmune) 103 102 { 104 103 removeHealth(100); 105 lastStone = stone; 106 104 this->getGame()->addPoints(10); 105 106 //The ship will be immune for 3 seconds after it has been hit by an asteroid 107 bImmune = true; 108 isimmune.setTimer(3.0f, false, createExecutor(createFunctor(&Asteroids2DShip::toggleImmune, this))); 109 orxout()<< "touched" << endl; 107 110 } 108 111 return false;
Note: See TracChangeset
for help on using the changeset viewer.