Changeset 10004 in orxonox.OLD for branches/playability/src/world_entities
- Timestamp:
- Dec 3, 2006, 10:36:50 PM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/WorldEntities.am
r9998 r10004 40 40 world_entities/weapons/medium_blaster.cc \ 41 41 world_entities/weapons/heavy_blaster.cc \ 42 world_entities/weapons/swarm_missile.cc \ 42 43 \ 43 44 world_entities/projectiles/bolt.cc \ 44 45 world_entities/projectiles/mbolt.cc \ 45 46 world_entities/projectiles/hbolt.cc \ 47 world_entities/projectiles/swarm_projectile.cc \ 46 48 world_entities/projectiles/bomb.cc \ 47 49 world_entities/projectiles/laser.cc \ … … 150 152 weapons/medium_blaster.h \ 151 153 weapons/heavy_blaster.h \ 154 weapons/swarm_missile.h \ 152 155 \ 153 156 projectiles/bolt.h \ 154 157 projectiles/mbolt.h \ 155 158 projectiles/hbolt.h \ 159 projectiles/swarm_projectile.h \ 156 160 projectiles/bomb.h \ 157 161 projectiles/laser.h \ -
branches/playability/src/world_entities/projectiles/hbolt.cc
r10003 r10004 47 47 this->angle = 0; 48 48 this->rotationSpeed = 1000; 49 49 50 50 51 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 118 119 void HBolt::updateAngle (float time) 119 120 { 121 <<<<<<< .mine 122 this->angle += this->rotationSpeed * time; 123 ======= 120 124 this->angle = this->angle + this->rotationSpeed * time; 125 >>>>>>> .r10003 121 126 } 122 127 … … 173 178 //this->updateAngle(); 174 179 180 <<<<<<< .mine 181 //glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 182 //glRotatef(this->angle, 0.0, 0.0, -1.0); 183 glTranslatef (this->getAbsCoor ().x, 184 this->getAbsCoor ().y, 185 this->getAbsCoor ().z); 186 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 187 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 188 glRotatef(this->angle, 0.0, 0.0, -1.0); 189 ======= 175 190 //glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 176 191 //glRotatef(this->angle, 0.0, 0.0, -1.0); … … 181 196 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 182 197 glRotatef(this->angle, 0.0, 0.0, 1.0); 198 >>>>>>> .r10003 183 199 this->getModel()->draw(); 184 200 glPopMatrix(); -
branches/playability/src/world_entities/space_ships/space_ship.cc
r10001 r10004 26 26 #include "weapons/medium_blaster.h" 27 27 #include "weapons/heavy_blaster.h" 28 #include "weapons/swarm_missile.h" 28 29 #include "weapons/boomerang_gun.h" 29 30 #include "weapons/turret.h" … … 152 153 wpLeft3->setName("Heavy Blaster Left"); 153 154 154 Weapon* cannon = new BoomerangGun();//Cannon(); 155 cannon->setName("End of World"); 155 Weapon* cannon = new SwarmMissile(); 156 cannon->setName("Swarm Missile"); 157 156 158 157 159 … … 273 275 this->secWeaponMan.setSlotCount(6); 274 276 275 this->secWeaponMan.setSlotPosition(0, Vector( 2.6, -2.5, 0));277 this->secWeaponMan.setSlotPosition(0, Vector(1.5, -1, 0)); 276 278 this->secWeaponMan.setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 277 279 … … 300 302 this->weaponMan.getFixedTarget()->setParent(this); 301 303 this->weaponMan.getFixedTarget()->setRelCoor(100000,0,0); 304 302 305 303 306 this->secWeaponMan.getFixedTarget()->setParent(this); 304 307 this->secWeaponMan.getFixedTarget()->setRelCoor(100000,0,0); 308 this->secWeaponMan.setRotationSpeed(0); 305 309 306 310 dynamic_cast<Element2D*>(this->weaponMan.getFixedTarget())->setVisibility( false); … … 367 371 void SpaceShip::enter() 368 372 { 369 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true); 373 this->secWeaponMan.showCrosshair(); 374 //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( true); 370 375 this->attachCamera(); 371 376 } … … 373 378 void SpaceShip::leave() 374 379 { 375 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 380 this->secWeaponMan.hideCrosshair(); 381 //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( false); 376 382 this->detachCamera(); 377 383 } -
branches/playability/src/world_entities/weapons/weapon_manager.cc
r9998 r10004 126 126 { 127 127 this->crosshair->setVisibility( false); 128 } 129 130 void WeaponManager::setRotationSpeed(float speed) 131 { 132 this->crosshair->setRotationSpeed(speed); 128 133 } 129 134 … … 431 436 432 437 /* 433 if( this->crosshair != NULL)434 {435 438 this->crosshair->setRotationSpeed(500); 436 439 this->crossHairSizeAnim->replay(); 437 }*/440 */ 438 441 } 439 442 -
branches/playability/src/world_entities/weapons/weapon_manager.h
r9998 r10004 62 62 void showCrosshair(); 63 63 void hideCrosshair(); 64 void setRotationSpeed(float speed); 64 65 65 66 void setSlotCount(unsigned int slotCount);
Note: See TracChangeset
for help on using the changeset viewer.