Changeset 5434 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Oct 25, 2005, 11:38:46 AM (19 years ago)
- Location:
- trunk/src/world_entities/power_ups
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/power_ups/power_up.cc
r5433 r5434 27 27 { 28 28 this->setClassID(CL_POWER_UP, "PowerUp"); 29 29 30 } 30 31 … … 34 35 35 36 37 void PowerUp::loadParam(const TiXmlElement* root) 38 { 39 static_cast<WorldEntity*>(this)->loadParams(root); 40 41 } 42 -
trunk/src/world_entities/power_ups/power_up.h
r5433 r5434 9 9 #include "world_entity.h" 10 10 11 class PowerUp : WorldEntity {11 class PowerUp : public WorldEntity { 12 12 13 13 public: 14 14 PowerUp (); 15 15 virtual ~PowerUp (); 16 16 void loadParam(const TiXmlElement* root); 17 17 }; 18 18 -
trunk/src/world_entities/power_ups/turret_power_up.cc
r5433 r5434 1 2 3 1 /* 4 2 orxonox - the future of 3D-vertical-scrollers … … 12 10 13 11 ### File Specific: 14 main-programmer: ...12 main-programmer: Benjamin Grauer 15 13 co-programmer: ... 16 14 */ 17 15 18 16 19 #include " power_up.h"20 17 #include "turret_power_up.h" 18 #include "factory.h" 21 19 22 20 using namespace std; 23 21 22 CREATE_FACTORY(TurretPowerUp); 24 23 25 24 26 PowerUp::PowerUp ()25 TurretPowerUp::TurretPowerUp () 27 26 { 28 this->setClassID(CL_POWER_UP, "PowerUp"); 27 this->init(); 28 } 29 30 TurretPowerUp::TurretPowerUp(const TiXmlElement* root) 31 { 32 this->init(); 33 34 this->loadParams(root); 29 35 } 30 36 31 37 32 33 PowerUp::~PowerUp () {} 38 TurretPowerUp::~TurretPowerUp () {} 34 39 35 40 41 void TurretPowerUp::init() 42 { 43 this->setClassID(CL_TURRET_POWER_UP, "TurretPowerUp"); 44 this->loadModel("models/guns/turret1.obj"); 45 } 46 47 48 void TurretPowerUp::loadParams(const TiXmlElement* root) 49 { 50 static_cast<PowerUp*>(this)->loadParams(root); 51 52 } -
trunk/src/world_entities/power_ups/turret_power_up.h
r5433 r5434 1 1 /*! 2 * @file power_up.h2 * @file turret_power_up.h 3 3 * @brief A class representing a PowerUp in the world. 4 4 */ 5 5 6 #ifndef _ POWER_UP_H7 #define _ POWER_UP_H6 #ifndef _TURRET_POWER_UP_H 7 #define _TURRET_POWER_UP_H 8 8 9 #include " world_entity.h"9 #include "power_up.h" 10 10 11 class PowerUp : WorldEntity{11 class TurretPowerUp : public PowerUp { 12 12 13 13 public: 14 PowerUp (); 15 virtual ~PowerUp (); 14 TurretPowerUp(); 15 TurretPowerUp(const TiXmlElement* root); 16 virtual ~TurretPowerUp (); 16 17 18 private: 19 void init(); 20 void loadParams(const TiXmlElement* root); 17 21 }; 18 22 19 #endif /* _ POWER_UP_H */23 #endif /* _TURRET_POWER_UP_H */
Note: See TracChangeset
for help on using the changeset viewer.