Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3576 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Mar 16, 2005, 4:35:02 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: added function for setting the energy of a weapon

Location:
orxonox/trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapon.cc

    r3575 r3576  
    100100
    101101
     102/**
     103   \brief this sets the energy of a weapon
     104   \param amount of energy
    102105
     106   a weapon has a limited amount of energy, this means a limited amount of shoots
     107*/
     108void Weapon::setWeaponEnergy(int energy)
     109{}
     110
     111/**
     112   \brief adds weapon energy
     113   \param amount of energy
     114   \returns amount of energy, that is over the energy limit
     115
     116   this can be used for energy-power up for example. There is a limited amount of energy
     117   a weapon can have. so if you want to add more, than it supports, the rest will
     118   be returned from this weapon.
     119*/
     120int Weapon::addWeaponEnergy(int addEnergy)
     121{}
     122
     123/**
     124   \brief removes weapon energy
     125   \param amount of enery
     126
     127   this is the case, when ther should be some sort of energy loss in the weapon
     128   system. propably wont be the case but usefull to have
     129*/
     130void Weapon::substractWeaponEnergy(int subEnergy)
     131{}
     132
     133/**
     134   \brief gets the amount of energy of a weapon (= ammo)
     135*/
     136int Weapon::getWeaponEnergy()
     137{}
    103138
    104139
  • orxonox/trunk/src/world_entities/weapon.h

    r3575 r3576  
    4444
    4545  void setWeaponEnergy(int energy);
    46   void addWeaponEnergy(int addEnergy);
     46  int addWeaponEnergy(int addEnergy);
    4747  void substractWeaponEnergy(int subEnergy);
    4848  int getWeaponEnergy();
     
    6161  float slowDownFactor;
    6262  int energyConsumption;
     63  int energyLimit;
    6364  Projectile* projectile;
    6465
Note: See TracChangeset for help on using the changeset viewer.