Changeset 6040 in orxonox.OLD for branches/powerups/src/world_entities/power_ups/power_up.cc
- Timestamp:
- Dec 11, 2005, 1:34:18 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/world_entities/power_ups/power_up.cc
r5973 r6040 19 19 #include "power_up.h" 20 20 #include "extendable.h" 21 21 #include "primitive_model.h" 22 22 23 23 using namespace std; 24 24 25 PowerUp::PowerUp() { } 25 Model* PowerUp::sphereModel = new PrimitiveModel(PRIM_SPHERE, 7, 5); 26 26 27 PowerUp::~PowerUp () {} 27 PowerUp::PowerUp(float r, float g, float b) 28 { 29 this->sphereMaterial = new Material; 30 this->sphereMaterial->setTransparency(.1); 31 this->sphereMaterial->setDiffuse(r, g, b); 32 } 33 34 PowerUp::~PowerUp () 35 { 36 delete this->sphereMaterial; 37 } 28 38 29 39 … … 49 59 this->setVisibiliy(false); 50 60 } 61 62 void PowerUp::draw() 63 { 64 WorldEntity::draw(); 65 this->sphereMaterial->select(); 66 sphereModel->draw(); 67 } 68
Note: See TracChangeset
for help on using the changeset viewer.