WeaponRepeat Class Reference

#include <WeaponRepeat.h>

Inheritance diagram for WeaponRepeat:

WeaponCallback Weapon AccessoryPart

List of all members.

Public Member Functions

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

Protected Attributes

WeaponrepeatWeapon_
NumberParser delay_
int repeat_


Detailed Description

Definition at line 26 of file WeaponRepeat.h.


Constructor & Destructor Documentation

WeaponRepeat::WeaponRepeat (  ) 

Definition at line 27 of file WeaponRepeat.cpp.

WeaponRepeat::~WeaponRepeat (  )  [virtual]

Definition at line 32 of file WeaponRepeat.cpp.


Member Function Documentation

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

Reimplemented from Weapon.

Definition at line 37 of file WeaponRepeat.cpp.

References AccessoryPart::AccessoryWeapon, delay_, AccessoryCreateContext::getAccessoryStore(), XMLNode::getNamedChild(), AccessoryPart::getType(), AccessoryPart::parent_, Weapon::parseXML(), repeat_, repeatWeapon_, and XMLNode::returnError().

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

Implements Weapon.

Definition at line 61 of file WeaponRepeat.cpp.

References delay_, Weapon::fireWeapon(), NumberParser::getValue(), repeat_, repeatWeapon_, and weaponCallback().

WeaponRepeat::REGISTER_ACCESSORY_HEADER ( WeaponRepeat  ,
AccessoryPart::AccessoryWeapon   
)

void WeaponRepeat::weaponCallback ( ScorchedContext context,
WeaponFireContext weaponContext,
FixedVector position,
FixedVector velocity,
unsigned int  userData 
) [virtual]

Implements WeaponCallback.

Definition at line 77 of file WeaponRepeat.cpp.

References ActionController::addAction(), delay_, Weapon::fireWeapon(), ScorchedContext::getActionController(), NumberParser::getValue(), and repeatWeapon_.

Referenced by fireWeapon().


Member Data Documentation

Weapon* WeaponRepeat::repeatWeapon_ [protected]

Definition at line 47 of file WeaponRepeat.h.

Referenced by fireWeapon(), parseXML(), and weaponCallback().

NumberParser WeaponRepeat::delay_ [protected]

Definition at line 48 of file WeaponRepeat.h.

Referenced by fireWeapon(), parseXML(), and weaponCallback().

int WeaponRepeat::repeat_ [protected]

Definition at line 49 of file WeaponRepeat.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