Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2007, 7:31:23 PM (17 years ago)
Author:
nicolasc
Message:

initial modularisation in spaceship config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc

    r10648 r10659  
    218218
    219219
    220 //   this->weaponMan.addWeapon( acid0, 3, 0);
    221 //   this->weaponMan.addWeapon( acid1, 3, 1);
    222 
    223 
    224220  this->secWeaponMan.addWeapon( cannon, 0, 2);
    225 //   this->secWeaponMan.addWeapon( spike, 1, 3);
    226 //   this->secWeaponMan.addWeapon( acid0, 2, 2);
    227 //   this->secWeaponMan.addWeapon( acid1, 2, 3);
    228 
    229221
    230222  this->weaponMan.changeWeaponConfig(3);
     
    232224
    233225
    234 //   curWeaponPrimary    = 3;
    235 //   curWeaponSecondary  = 0;
    236 
    237226  Playable::weaponConfigChanged();
    238227
    239   reactorOutput     = 10;
    240 
    241   weaponEnergyRegen = 10;       // 10 einheiten pro Sekunde
    242   engineSpeedBase   = 15;
    243   shieldRegen       = 2;
    244 
     228//   reactorOutput     = 10;
     229  setReactor(10);
     230//   weaponEnergyRegen = 10;       // 10 einheiten pro Sekunde
     231  setWeapon(10);
     232//   engineSpeedBase   = 15;
     233  setEngine(15);
     234//   shieldRegen       = 2;
     235/*
    245236  shieldEnergyShare = 0.3;
    246237  weaponEnergyShare = 0.3;
    247   engineEnergyShare = 0.4;
    248 
     238  engineEnergyShare = 0.4;*/
     239  setEnergyShare(.3,.3,.4);
     240/*
    249241  shieldCur         = 100;
    250242  shieldMax         = 100;
    251   shieldTH          = .2 * shieldMax;   // shield power must be 20% before shield kicks in again
    252 
     243  shieldTH          = .2 * shieldMax;   // shield power must be 20% before shield kicks in again*/
     244  setShield(100, 100, .2, 2);
     245/*
    253246  this->setHealth( 100);
    254   this->setHealthMax( 100);
    255 
     247  this->setHealthMax( 100);*/
     248  setArmor(100, 100);
     249/*
    256250  electronicCur = 50;
    257251  electronicMax = 50;
    258252  electronicRegen   = 3;
    259   electronicTH      = .7 * electronicMax; // 30% of eDamage can be handled by the ship
    260 
    261 
    262   this->loadModel("models/spaceships/fighter_redesign9.obj");
     253  electronicTH      = .7 * electronicMax; // 30% of eDamage can be handled by the ship*/
     254  setElectronic(50, 50, .7, 3.0);
     255
     256//   this->loadModel("models/spaceships/fighter_redesign9.obj");
    263257  //this->setVisibiliy(false);
    264258
    265259  bForward = bBackward = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = bFire = bSecFire = false;
    266260
    267   this->setHealthMax(shieldMax);
    268   this->setHealth(shieldCur);
     261//   this->setHealthMax(shieldMax);
     262//   this->setHealth(shieldCur);
    269263
    270264  this->travelNode = new PNode();
     
    405399//   this->trailL->setTexture( "textures/engine.png");
    406400//
    407 //   this->trailR = new Trail( 5, 10, .2, this);
     401//   this->trailR = new ( 5, 10, .2, this);
    408402//   this->trailR->setTexture( "textures/engine.png");
    409403
     
    437431
    438432  State::getCamera()->setViewMode(Camera::ViewTop);
     433
     434  LoadParam(root, "reactor", this, SpaceShip, setReactor);
     435  LoadParam(root, "shield", this, SpaceShip, setShield);
     436  LoadParam(root, "armor", this, SpaceShip, setArmor);
     437  LoadParam(root, "electronic", this, SpaceShip, setElectronic);
     438  LoadParam(root, "engine", this, SpaceShip, setEngine);
     439  LoadParam(root, "energyshare", this, SpaceShip, setEnergyShare);
     440  LoadParam(root, "weapon", this, SpaceShip, setWeapon);
     441
    439442}
    440443
Note: See TracChangeset for help on using the changeset viewer.