Changeset 6040 in orxonox.OLD for branches/powerups/src
- Timestamp:
- Dec 11, 2005, 1:34:18 AM (19 years ago)
- Location:
- branches/powerups/src/world_entities/power_ups
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/world_entities/power_ups/laser_power_up.cc
r5955 r6040 27 27 CREATE_FACTORY(LaserPowerUp, CL_LASER_POWER_UP); 28 28 29 LaserPowerUp::LaserPowerUp () 29 LaserPowerUp::LaserPowerUp () : PowerUp(0.0, 1.0, 0.0) 30 30 { 31 31 this->init(); 32 32 } 33 33 34 LaserPowerUp::LaserPowerUp(const TiXmlElement* root) 34 LaserPowerUp::LaserPowerUp(const TiXmlElement* root) : PowerUp(0.0, 1.0, 0.0) 35 35 { 36 36 this->init(); -
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 -
branches/powerups/src/world_entities/power_ups/power_up.h
r5973 r6040 9 9 #include "world_entity.h" 10 10 11 class Material; 12 11 13 class PowerUp : public WorldEntity { 12 14 … … 15 17 void collidesWith (WorldEntity* entity, const Vector& location); 16 18 19 void draw(); 20 17 21 protected: 18 PowerUp( );22 PowerUp(float r, float g, float b); 19 23 virtual ~PowerUp (); 20 24 virtual void hide(); 25 26 static Model* sphereModel; 27 28 private: 29 Material* sphereMaterial; 21 30 }; 22 31 -
branches/powerups/src/world_entities/power_ups/turret_power_up.cc
r5955 r6040 27 27 CREATE_FACTORY(TurretPowerUp, CL_TURRET_POWER_UP); 28 28 29 TurretPowerUp::TurretPowerUp () 29 TurretPowerUp::TurretPowerUp () : PowerUp(0.0, 1.0, 0.0) 30 30 { 31 31 this->init(); 32 32 } 33 33 34 TurretPowerUp::TurretPowerUp(const TiXmlElement* root) 34 TurretPowerUp::TurretPowerUp(const TiXmlElement* root) : PowerUp(0.0, 1.0, 0.0) 35 35 { 36 36 this->init(); -
branches/powerups/src/world_entities/power_ups/weapon_power_up.cc
r5988 r6040 30 30 CREATE_FACTORY(WeaponPowerUp, CL_WEAPON_POWER_UP); 31 31 32 WeaponPowerUp::WeaponPowerUp () 32 WeaponPowerUp::WeaponPowerUp () : PowerUp(0.0, 1.0, 0.0) 33 33 { 34 34 this->init(); 35 35 } 36 36 37 WeaponPowerUp::WeaponPowerUp(const TiXmlElement* root) 37 WeaponPowerUp::WeaponPowerUp(const TiXmlElement* root) : PowerUp(0.0, 1.0, 0.0) 38 38 { 39 39 this->init();
Note: See TracChangeset
for help on using the changeset viewer.