- Timestamp:
- Nov 25, 2013, 6:51:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/invaders/src/modules/invader/InvaderShip.cc
r9828 r9829 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 #include "Invader.h" 38 39 39 40 namespace orxonox … … 120 121 { 121 122 lastTime = 0; 123 if (getGame()) 124 { 125 getGame()->levelUp(); 126 // SmartPtr<Invader> game = orxonox_cast<Invader>(getGametype()); 127 128 } 122 129 //level++ 123 130 } … … 151 158 { 152 159 orxout() << "DIED!!!! " << endl; 160 if (getGame()) 161 { 162 getGame()->costLife(); 163 // SmartPtr<Invader> game = orxonox_cast<Invader>(getGametype()); 164 165 } 153 166 } 154 167 return false; … … 157 170 // SUPER(InvaderShip, collidesAgainst, otherObject, contactPoint); 158 171 } 172 173 WeakPtr<Invader> InvaderShip::getGame() 174 { 175 if (game == NULL) 176 { 177 for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it) 178 game = *it; 179 } 180 return game; 181 } 159 182 }
Note: See TracChangeset
for help on using the changeset viewer.