Changeset 6107 in orxonox.OLD for branches/powerups/src/world_entities/power_ups/power_up.cc
- Timestamp:
- Dec 14, 2005, 3:15:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/world_entities/power_ups/power_up.cc
r6040 r6107 50 50 if(dynamic_cast<Extendable*>(entity)->pickup(this)) 51 51 { 52 this-> hide();52 this->setVisibiliy(false); 53 53 } 54 54 } 55 55 } 56 56 57 void PowerUp:: hide()57 void PowerUp::draw() const 58 58 { 59 this->setVisibiliy(false); 59 WorldEntity::draw(); 60 61 glMatrixMode(GL_MODELVIEW); 62 glPushMatrix(); 63 float matrix[4][4]; 64 65 /* translate */ 66 glTranslatef (this->getAbsCoor ().x, 67 this->getAbsCoor ().y, 68 this->getAbsCoor ().z); 69 /* rotate */ // FIXME: devise a new Way to rotate this 70 this->getAbsDir ().matrix (matrix); 71 glMultMatrixf((float*)matrix); 72 73 this->sphereMaterial->select(); 74 sphereModel->draw(); 75 76 glPopMatrix(); 60 77 } 61 78 62 void PowerUp::draw() 79 const char* PowerUp::respawnTypes[] = { 80 "none", 81 "time" 82 }; 83 84 void PowerUp::setRespawnType(const char* type) 63 85 { 64 WorldEntity::draw(); 65 this->sphereMaterial->select(); 66 sphereModel->draw(); 86 for(int i = 0; i < RESPAWN_size; ++i) { 87 if(strcmp(type, respawnTypes[i]) == 0) { 88 this->respawnType = (PowerUpRespawn)i; 89 break; 90 } 91 } 67 92 } 68 93
Note: See TracChangeset
for help on using the changeset viewer.