WeaponLaser Class Reference

#include <WeaponLaser.h>

Inheritance diagram for WeaponLaser:

Weapon AccessoryPart

List of all members.

Public Member Functions

 WeaponLaser ()
virtual ~WeaponLaser ()
virtual bool parseXML (AccessoryCreateContext &context, XMLNode *accessoryNode)
void fireWeapon (ScorchedContext &context, WeaponFireContext &weaponContext, FixedVector &position, FixedVector &velocity)
 REGISTER_ACCESSORY_HEADER (WeaponLaser, AccessoryPart::AccessoryWeapon)

Protected Attributes

LaserParams laserParams_
NumberParser minimumHurt_
NumberParser maximumHurt_
NumberParser minimumDistance_
NumberParser maximumDistance_
NumberParser hurtRadius_
NumberParser totalTime_


Detailed Description

Definition at line 27 of file WeaponLaser.h.


Constructor & Destructor Documentation

WeaponLaser::WeaponLaser (  ) 

Definition at line 28 of file WeaponLaser.cpp.

WeaponLaser::~WeaponLaser (  )  [virtual]

Definition at line 32 of file WeaponLaser.cpp.


Member Function Documentation

bool WeaponLaser::parseXML ( AccessoryCreateContext context,
XMLNode accessoryNode 
) [virtual]

Reimplemented from Weapon.

Definition at line 36 of file WeaponLaser.cpp.

References XMLNode::getNamedChild(), hurtRadius_, laserParams_, maximumDistance_, maximumHurt_, minimumDistance_, minimumHurt_, LaserParams::parseXML(), Weapon::parseXML(), and totalTime_.

void WeaponLaser::fireWeapon ( ScorchedContext context,
WeaponFireContext weaponContext,
FixedVector position,
FixedVector velocity 
) [virtual]

Implements Weapon.

Definition at line 52 of file WeaponLaser.cpp.

References ActionController::addAction(), ScorchedContext::getActionController(), NumberParser::getValue(), hurtRadius_, laserParams_, maximumDistance_, maximumHurt_, minimumDistance_, minimumHurt_, LaserParams::setHurtRadius(), LaserParams::setMaximumDistance(), LaserParams::setMaximumHurt(), LaserParams::setMinimumDistance(), LaserParams::setMinimumHurt(), LaserParams::setTotalTime(), and totalTime_.

WeaponLaser::REGISTER_ACCESSORY_HEADER ( WeaponLaser  ,
AccessoryPart::AccessoryWeapon   
)


Member Data Documentation

LaserParams WeaponLaser::laserParams_ [protected]

Definition at line 43 of file WeaponLaser.h.

Referenced by fireWeapon(), and parseXML().

NumberParser WeaponLaser::minimumHurt_ [protected]

Definition at line 47 of file WeaponLaser.h.

Referenced by fireWeapon(), and parseXML().

NumberParser WeaponLaser::maximumHurt_ [protected]

Definition at line 47 of file WeaponLaser.h.

Referenced by fireWeapon(), and parseXML().

NumberParser WeaponLaser::minimumDistance_ [protected]

Definition at line 48 of file WeaponLaser.h.

Referenced by fireWeapon(), and parseXML().

NumberParser WeaponLaser::maximumDistance_ [protected]

Definition at line 48 of file WeaponLaser.h.

Referenced by fireWeapon(), and parseXML().

NumberParser WeaponLaser::hurtRadius_ [protected]

Definition at line 49 of file WeaponLaser.h.

Referenced by fireWeapon(), and parseXML().

NumberParser WeaponLaser::totalTime_ [protected]

Definition at line 50 of file WeaponLaser.h.

Referenced by fireWeapon(), and parseXML().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:08 2009 for Scorched3D by  doxygen 1.5.3