#include <CSWWeapon.h>
Public Member Functions | |
virtual bool | arm (double fArmDelay) |
virtual bool | fire (double fFireDelay) |
Public Member Functions inherited from CodeSubWars::CSWObject | |
const std::string & | getName () const |
This is the base class for all weapons within the world. A weapon is a thing that can causes damage to other damagable objects. The damage height to other objects is depend on its size. Larger weapon causes higher damage. This has the property to emit sound on its explosion that is depend on the explosion power.
|
virtual |
Sets the relative time from now when the weapon will be armed. Only if a weapon is armed it could explode. This is only available if the weapon was not launched.
fArmDelay | The time from now in seconds when the weapon is armed. |
|
virtual |
Sets the relative time from now when the weapon will be fired. This time should be larger than the arm delay. This is only available if the weapon was not launched.
fFireDelay | The time from now in seconds when the weapon is fired. |