Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10030 in orxonox.OLD


Ignore:
Timestamp:
Dec 6, 2006, 5:35:28 PM (17 years ago)
Author:
marcscha
Message:

Second Weapon Ammo Widget Support

Location:
branches/playability/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/util/hud.cc

    r10023 r10030  
    236236
    237237  std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget;
    238   Vector2D pos(0.3, .7);
     238  Vector2D pos(0.3, .9);
    239239  for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++, pos.x+=.2)
    240240  {
  • branches/playability/src/world_entities/player.cc

    r10023 r10030  
    7575    this->playable = playable;
    7676    this->_hud.setEnergyWidget(this->playable->getHealthWidget());
    77     /*if (dynamic_cast<SpaceShip*>(this->playable))
     77    if (dynamic_cast<SpaceShip*>(this->playable) != 0)
    7878      this->_hud.setWeaponManager(&this->playable->getWeaponManager(), &dynamic_cast<SpaceShip*>(this->playable)->getWeaponManagerSecondary());
    79     else*/
     79    else
    8080      this->_hud.setWeaponManager(&this->playable->getWeaponManager());
    8181
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10024 r10030  
    145145
    146146  Weapon* wpRight1 = new LightBlaster ();
    147   wpRight1->setName("Light Blaster Right");
     147  wpRight1->setName("LightBlaster");
    148148  Weapon* wpLeft1 = new LightBlaster ();
    149   wpLeft1->setName("Medium Blaster Left");
     149  wpLeft1->setName("LightBlaster");
    150150
    151151  Weapon* wpRight2 = new MediumBlaster ();
    152   wpRight2->setName("Medium Blaster Right");
     152  wpRight2->setName("MediumBlaster");
    153153  Weapon* wpLeft2 = new MediumBlaster ();
    154   wpLeft2->setName("Medium Blaster Left");
    155 
    156 /*  Weapon* wpRight3 = new HeavyBlaster ();
    157   wpRight3->setName("Heavy Blaster Right");
     154  wpLeft2->setName("MediumBlaster");
     155
     156  Weapon* wpRight3 = new HeavyBlaster ();
     157  wpRight3->setName("HeavyBlaster");
    158158  Weapon* wpLeft3 = new HeavyBlaster ();
    159   wpLeft3->setName("Heavy Blaster Left");*/
     159  wpLeft3->setName("HeavyBlaster");
    160160
    161161  Weapon* cannon = new SwarmLauncher();
     
    168168  this->weaponMan.addWeapon( wpLeft2, 0, 2);
    169169  this->weaponMan.addWeapon( wpRight2, 0, 3);
    170 /*  this->weaponMan.addWeapon( wpLeft3, 0, 4);
    171   this->weaponMan.addWeapon( wpRight3, 0, 5);*/
     170  this->weaponMan.addWeapon( wpLeft3, 0, 4);
     171  this->weaponMan.addWeapon( wpRight3, 0, 5);
    172172
    173173  this->secWeaponMan.addWeapon( cannon, 1, 0);
     
    180180  wpRight2->requestAction(WA_ACTIVATE);
    181181  wpLeft2->requestAction(WA_ACTIVATE);
    182 /*  wpRight3->requestAction(WA_ACTIVATE);
    183   wpLeft3->requestAction(WA_ACTIVATE);*/
     182  wpRight3->requestAction(WA_ACTIVATE);
     183  wpLeft3->requestAction(WA_ACTIVATE);
    184184
    185185  cannon->requestAction(WA_ACTIVATE);
  • branches/playability/src/world_entities/space_ships/space_ship.h

    r10023 r10030  
    5656    virtual void process(const Event &event);
    5757
    58     inline WeaponManager getWeaponManagerSecondary() { return this->secWeaponMan; };
     58    inline WeaponManager& getWeaponManagerSecondary() { return this->secWeaponMan; };
    5959
    6060    //Functions for GUI
  • branches/playability/src/world_entities/weapons/weapon.cc

    r9998 r10030  
    516516    if (this->soundBuffers[WA_SHOOT].loaded())
    517517      this->soundSource->play(this->soundBuffers[WA_SHOOT]);
    518     this->updateWidgets();
    519518    // fire
    520519    this->energy -= this->minCharge;
     
    522521    // setting up for the next state
    523522    this->enterState(WS_SHOOTING);
     523    this->updateWidgets();
    524524  }
    525525  else  // reload if we still have the charge
Note: See TracChangeset for help on using the changeset viewer.