Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5982 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Dec 8, 2005, 12:22:53 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Factory-Redesign on the wish of manuel

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/space_ships/space_ship.cc

    r5978 r5982  
    8888  Weapon* wpLeft = new TestGun(1);
    8989  wpLeft->setName("testGun Left");
    90   Weapon* cannon = dynamic_cast<Weapon*>(Factory::getFirst()->fabricate(CL_CANNON));
     90  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON));
    9191
    9292  cannon->setName("BFG");
     
    118118  xMouse = yMouse = 0;
    119119  mouseSensitivity = 0.001;
    120  
     120
    121121  cycle = 0.0;
    122  
     122
    123123
    124124  travelSpeed = 15.0;
     
    271271
    272272  //orient the spaceship model in the direction of movement.
    273  
     273
    274274  // this is the air friction (necessary for a smooth control)
    275275  if(velocity.len() != 0) velocity -= velocity*0.01;
    276  
     276
    277277  this->shiftCoor(Vector(0,1,0)*cos(this->cycle*2.0)*0.02);
    278  
     278
    279279  //SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
    280280
     
    327327    //rotVal += .4;
    328328  }
    329  
     329
    330330  if( this->bRollL /* > -this->getRelCoor().z*2*/)
    331331  {
     
    385385void SpaceShip::process(const Event &event)
    386386{
    387  
    388  
     387
     388
    389389  if( event.type == SDLK_a)
    390390      this->bRollL = event.bPressed;
  • trunk/src/world_entities/weapons/ground_turret.cc

    r5915 r5982  
    8585  element = root->FirstChildElement("weapon-left");
    8686  if (element != NULL) element = element->FirstChildElement();
    87   this->left = dynamic_cast<Weapon*>( Factory::getFirst()->fabricate( element) );
     87  this->left = dynamic_cast<Weapon*>( Factory::fabricate( element) );
    8888  if (this->left)
    8989  {
     
    9494  element = root->FirstChildElement("weapon-right");
    9595  if (element != NULL)  if (element != NULL) element = element->FirstChildElement();
    96   this->right = dynamic_cast<Weapon*>( Factory::getFirst()->fabricate( element) );
     96  this->right = dynamic_cast<Weapon*>( Factory::fabricate( element) );
    9797  if (this->right)
    9898  {
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r5885 r5982  
    140140  LOAD_PARAM_START_CYCLE(root, element);
    141141
    142   Weapon* newWeapon = dynamic_cast<Weapon*>(Factory::getFirst()->fabricate(element));
     142  Weapon* newWeapon = dynamic_cast<Weapon*>(Factory::fabricate(element));
    143143  /// @todo implement this !!
    144144
Note: See TracChangeset for help on using the changeset viewer.