Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2006, 7:40:07 PM (17 years ago)
Author:
marcscha
Message:

multiple weapons, crosshair visibility → changelog

Location:
branches/playability/src/world_entities/weapons
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/weapons/heavy_blaster.cc

    r9979 r9998  
    5151 
    5252
    53   this->setStateDuration(WS_SHOOTING, 0.5);
     53  this->setStateDuration(WS_SHOOTING, 0.5);   // 2 Schuss pro Sekunde
    5454  this->setStateDuration(WS_RELOADING, 0);
    5555  this->setStateDuration(WS_ACTIVATING, .5);
    5656  this->setStateDuration(WS_DEACTIVATING, 1);
    5757
    58   this->setEnergyMax(5000);
    59   this->increaseEnergy(5000);
     58  this->setEnergyMax(500);
     59  this->increaseEnergy(500);
    6060  //this->minCharge = 2;
    6161
     
    6666  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    6767  this->setProjectileTypeC("HBolt");   // FIXME temp project type until the blaste class exist
    68   this->prepareProjectiles(100);
     68  this->prepareProjectiles(5);
    6969
    7070  Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this);
  • branches/playability/src/world_entities/weapons/heavy_blaster.h

    r9975 r9998  
    88 *      @author Marc Schaerer <marcscha@ee.ethz.ch>
    99 * 
    10  *  Light Blaster class
     10 *  Heavy Blaster class
    1111 */
    1212class HeavyBlaster : public Weapon
  • branches/playability/src/world_entities/weapons/light_blaster.cc

    r9978 r9998  
    4444void LightBlaster::init()
    4545{
    46   //this->registerObject(this, LightBlaster::_objectList);
    47 
    48 //  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
    4946
    5047  this->loadModel("models/guns/plasmadriver_#.obj", 1.0);
    5148 
    5249
    53   this->setStateDuration(WS_SHOOTING, 0.05);
     50  this->setStateDuration(WS_SHOOTING, 0.05);  // 20 Schuss pro Sekunde
    5451  this->setStateDuration(WS_RELOADING, 0);
    5552  this->setStateDuration(WS_ACTIVATING, .5);
    5653  this->setStateDuration(WS_DEACTIVATING, 1);
    5754
    58   this->setEnergyMax(5000);
    59   this->increaseEnergy(5000);
     55  this->setEnergyMax(500);
     56  this->increaseEnergy(500);
    6057  //this->minCharge = 2;
    6158
  • branches/playability/src/world_entities/weapons/medium_blaster.cc

    r9996 r9998  
    5151 
    5252
    53   this->setStateDuration(WS_SHOOTING, 0.2);
     53  this->setStateDuration(WS_SHOOTING, 0.1);   // 10 Schuss pro Sekunde
     54
    5455  this->setStateDuration(WS_RELOADING, 0);
    5556  this->setStateDuration(WS_ACTIVATING, .5);
    5657  this->setStateDuration(WS_DEACTIVATING, 1);
    5758
    58   this->setEnergyMax(5000);
    59   this->increaseEnergy(5000);
     59  this->setEnergyMax(500);
     60  this->increaseEnergy(500);
    6061  //this->minCharge = 2;
    6162
     
    6566
    6667  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    67   this->setProjectileTypeC("RailProjectile");   // FIXME temp project type until the blaste class exist
    68   this->prepareProjectiles(100);
     68  this->setProjectileTypeC("MBolt");   // FIXME temp project type until the blaste class exist
     69  this->prepareProjectiles(20);
    6970
    7071  Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this);
  • branches/playability/src/world_entities/weapons/medium_blaster.h

    r9975 r9998  
    88 *      @author Marc Schaerer <marcscha@ee.ethz.ch>
    99 * 
    10  *  Light Blaster class
     10 *  Medium Blaster class
    1111 */
    1212class MediumBlaster : public Weapon
  • branches/playability/src/world_entities/weapons/weapon.cc

    r9966 r9998  
    541541      unlikely(this->energy + this->ammoContainer->getStoredEnergy() < this->minCharge))
    542542  {
    543     this->requestAction(WA_DEACTIVATE);
     543    //this->requestAction(WA_DEACTIVATE);
    544544    this->execute();
    545545    return false;
  • branches/playability/src/world_entities/weapons/weapon_manager.cc

    r9996 r9998  
    103103
    104104  this->currentConfigID = 0;
    105   this->slotCount = 6;
     105  this->slotCount = WM_MAX_SLOTS;
    106106  //this->weaponChange;
    107107
     
    114114  this->crossHairSizeAnim->addKeyFrame(100, .05, ANIM_LINEAR);
    115115  this->crossHairSizeAnim->addKeyFrame(50, .01, ANIM_LINEAR);
     116
     117  this->hideCrosshair();
     118}
     119
     120void WeaponManager::showCrosshair()
     121{
     122  this->crosshair->setVisibility( true);
     123}
     124
     125void WeaponManager::hideCrosshair()
     126{
     127  this->crosshair->setVisibility( false);
    116128}
    117129
     
    300312    if (this->parentEntity->isA(Playable::staticClassID()))
    301313      dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
     314   
    302315    weapon->setDefaultTarget(this->crosshair);
    303316  }
     
    416429          if( firingWeapon != NULL) firingWeapon->requestAction(WA_SHOOT);
    417430  }
    418   this->crosshair->setRotationSpeed(500);
    419   this->crossHairSizeAnim->replay();
     431
     432  /*
     433  if( this->crosshair != NULL)
     434  {
     435        this->crosshair->setRotationSpeed(500);
     436        this->crossHairSizeAnim->replay();
     437  } */
    420438}
    421439
  • branches/playability/src/world_entities/weapons/weapon_manager.h

    r9965 r9998  
    5959    virtual void loadParams(const TiXmlElement* root);
    6060    void loadWeapons(const TiXmlElement* root);
     61
     62    void showCrosshair();
     63    void hideCrosshair();
    6164
    6265    void setSlotCount(unsigned int slotCount);
Note: See TracChangeset for help on using the changeset viewer.