Changeset 1931 in orxonox.OLD for orxonox/trunk/core/npc.cc
- Timestamp:
- Jun 9, 2004, 10:49:04 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/npc.cc
r1904 r1931 25 25 26 26 27 NPC::NPC () {} 27 NPC::NPC () 28 { 29 hasDied = 0; 30 } 28 31 29 32 NPC::~NPC () {} … … 58 61 } 59 62 60 61 63 void NPC::drawNPC(void) 62 64 { 63 glPushMatrix(); 64 glTranslatef(xCor, yCor, 3.0); 65 //glScalef(1.0, 3.0, 1.0); 66 glutWireSphere(1.0, 10, 10); 67 glPopMatrix(); 68 //cout << "Player::drawNPC()" << endl; 65 /* fix: died flag approach is very stupid, just to show @ convention */ 66 if( hasDied == 0 ) { 67 glPushMatrix(); 68 glTranslatef(xCor, yCor, 3.0); 69 //glScalef(1.0, 3.0, 1.0); 70 glutWireSphere(1.0, 10, 10); 71 glPopMatrix(); 72 } 69 73 } 74 75 76 /* define the reaction, if the ship is been hit */ 77 int NPC::hit() 78 { 79 die(); 80 return 0; 81 } 82 83 void NPC::die() 84 { 85 hasDied = 1; 86 }
Note: See TracChangeset
for help on using the changeset viewer.