Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 25, 2015, 1:56:51 PM (10 years ago)
Author:
fvultier
Message:

improved documentation

Location:
code/branches/towerdefenseFabien/src/modules/weapons/projectiles
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/towerdefenseFabien/src/modules/weapons/projectiles/CMakeLists.txt

    r10592 r10594  
    55  Projectile.cc
    66  LightningGunProjectile.cc
    7   SplitGunProjectile.cc
    87  Rocket.cc
    98  SimpleRocket.cc
  • code/branches/towerdefenseFabien/src/modules/weapons/projectiles/SplitGunProjectile.cc

    r10592 r10594  
    2121 *
    2222 *   Author:
    23  *      Joel Smely
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    7777    }
    7878
     79    /**
     80    @brief
     81        This function starts a timer that will cause the projectile to split after a time defined by the argument @param splitTime.       
     82    */
    7983    void SplitGunProjectile::setSplitTime(float splitTime)
    8084    {
     
    9599    }
    96100
     101    /**
     102    @brief
     103        If this function is called the projectile splits up into many child projectiles. The original projectiles does not get destroyed but it will never split up again.
     104    */
    97105    void SplitGunProjectile::split()
    98106    {
     
    100108        {
    101109            -- numberOfSplits_;
     110
     111            // Reduce damage of this projectile by the number of childs plus one. This way the total amount of possible damage contained in the original projectile and its childs is unchanged after s aplit.
     112            this->setDamage(this->getDamage()/(numberOfChilds_+1));
    102113
    103114            // Calculate a normalized vector (velocityOffset) that is perpendicluar to the velocity of this projectile. Since there are infinitly many perpendicular vectors a random one is chosen.
     
    131142                projectile->setDamage(this->getDamage());
    132143                projectile->setShieldDamage(this->getShieldDamage());
    133                 projectile->setHealthDamage(this->getHealthDamage());               
     144                projectile->setHealthDamage(this->getHealthDamage());
    134145            }
    135146
  • code/branches/towerdefenseFabien/src/modules/weapons/projectiles/SplitGunProjectile.h

    r10592 r10594  
    2121 *
    2222 *   Author:
    23  *      Joel Smely
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    4646    /**
    4747    @brief
    48         The SplitGunProjectile is a projectile that is represented by a looped series of billboards.
    49        
     48        The SplitGunProjectile is a projectile that may split up into many child projectiles.
    5049    @author
    51         Joel Smely
     50        Fabien Vultier
    5251    @ingroup WeaponsProjectiles
    5352    */
Note: See TracChangeset for help on using the changeset viewer.