Changeset 5458 in orxonox.OLD for trunk/src/world_entities/power_ups/laser_power_up.cc
- Timestamp:
- Oct 30, 2005, 1:52:29 AM (20 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/power_ups/laser_power_up.cc
r5449 r5458 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 17 17 18 #include " turret_power_up.h"18 #include "laser_power_up.h" 19 19 #include "factory.h" 20 20 #include "state.h" … … 25 25 using namespace std; 26 26 27 CREATE_FACTORY( TurretPowerUp);27 CREATE_FACTORY(LaserPowerUp); 28 28 29 TurretPowerUp::TurretPowerUp ()29 LaserPowerUp::LaserPowerUp () 30 30 { 31 31 this->init(); 32 32 } 33 33 34 TurretPowerUp::TurretPowerUp(const TiXmlElement* root)34 LaserPowerUp::LaserPowerUp(const TiXmlElement* root) 35 35 { 36 36 this->init(); … … 40 40 41 41 42 TurretPowerUp::~TurretPowerUp ()42 LaserPowerUp::~LaserPowerUp () 43 43 { 44 44 delete this->sphereModel; … … 47 47 48 48 49 void TurretPowerUp::init()49 void LaserPowerUp::init() 50 50 { 51 this->setClassID(CL_ TURRET_POWER_UP, "TurretPowerUp");52 this->loadModelWithScale("models/guns/t urret1.obj", 2.0);51 this->setClassID(CL_LASER_POWER_UP, "LaserPowerUp"); 52 this->loadModelWithScale("models/guns/test_gun.obj", 2.0); 53 53 54 54 this->sphereModel = new PrimitiveModel(PRIM_SPHERE, 7, 5); 55 55 this->sphereMaterial = new Material; 56 56 this->sphereMaterial->setTransparency(.1); 57 this->sphereMaterial->setDiffuse(. 1, .1, .8);57 this->sphereMaterial->setDiffuse(.7, .7, .1); 58 58 59 59 this->rotation = Vector(0,1,0); … … 63 63 64 64 65 void TurretPowerUp::loadParams(const TiXmlElement* root)65 void LaserPowerUp::loadParams(const TiXmlElement* root) 66 66 { 67 67 static_cast<PowerUp*>(this)->loadParams(root); … … 76 76 * Implement behaviour like damage application or other miscellaneous collision stuff in this function 77 77 */ 78 void TurretPowerUp::collidesWith(WorldEntity* entity, const Vector& location)78 void LaserPowerUp::collidesWith(WorldEntity* entity, const Vector& location) 79 79 { 80 80 // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z); … … 89 89 * Handle all stuff that should update with time inside this method (movement, animation, etc.) 90 90 */ 91 void TurretPowerUp::tick(float dt)91 void LaserPowerUp::tick(float dt) 92 92 { 93 93 this->shiftDir(Quaternion(dt, this->rotation)); … … 102 102 * Just override this function with whatever you want to be drawn. 103 103 */ 104 void TurretPowerUp::draw()104 void LaserPowerUp::draw() 105 105 { glMatrixMode(GL_MODELVIEW); 106 106 glPushMatrix();
Note: See TracChangeset
for help on using the changeset viewer.