WeaponGiveLives Class Reference

#include <WeaponGiveLives.h>

Inheritance diagram for WeaponGiveLives:

WeaponCallback Weapon AccessoryPart

List of all members.

Public Member Functions

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

Protected Attributes

int lives_


Detailed Description

Definition at line 26 of file WeaponGiveLives.h.


Constructor & Destructor Documentation

WeaponGiveLives::WeaponGiveLives (  ) 

Definition at line 32 of file WeaponGiveLives.cpp.

WeaponGiveLives::~WeaponGiveLives (  )  [virtual]

Definition at line 37 of file WeaponGiveLives.cpp.


Member Function Documentation

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

Reimplemented from Weapon.

Definition at line 42 of file WeaponGiveLives.cpp.

References XMLNode::getNamedChild(), lives_, and Weapon::parseXML().

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

Implements Weapon.

Definition at line 51 of file WeaponGiveLives.cpp.

References ActionController::addAction(), and ScorchedContext::getActionController().

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

Implements WeaponCallback.

Definition at line 59 of file WeaponGiveLives.cpp.

References S3D::formatStringBuffer(), TankState::getLives(), TankState::getMaxLives(), WeaponFireContext::getPlayerId(), Tank::getState(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), Target::getTargetName(), LANG_RESOURCE_2, lives_, MAX, TankState::setLives(), and ChannelManager::showText().

WeaponGiveLives::REGISTER_ACCESSORY_HEADER ( WeaponGiveLives  ,
AccessoryPart::AccessoryWeapon   
)


Member Data Documentation

int WeaponGiveLives::lives_ [protected]

Definition at line 48 of file WeaponGiveLives.h.

Referenced by parseXML(), and weaponCallback().


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