equipWeapon Class Reference

A Weapon that performs an action on its owning Player when it is picked up and dropped. More...

#include <equipWeapon.h>

Inherits Weapon.

Inherited by wp_boot, wp_dunce, and wp_shield.

Inheritance diagram for equipWeapon:

Inheritance graph
[legend]
Collaboration diagram for equipWeapon:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 equipWeapon (Player *p)
virtual ~equipWeapon ()

Protected Member Functions

virtual void equipAction ()=0
 actions to perform when the Weapon is given to a Player
virtual void unEquipAction ()=0
 actions to perform when the Weapon is removed from a Player's inventory

Protected Attributes

spriteObjecteffect
 a spriteObject to spawn and attach to the Player who owns this Weapon, if necessary

Detailed Description

A Weapon that performs an action on its owning Player when it is picked up and dropped.

This is usually used to spawn a spriteObject and attach it to the Player for the duration of them holding the Weapon.

Author:
pospi

Definition at line 37 of file equipWeapon.h.


Constructor & Destructor Documentation

equipWeapon::equipWeapon ( Player p  ) 

Definition at line 23 of file equipWeapon.cpp.

equipWeapon::~equipWeapon (  )  [virtual]

Definition at line 28 of file equipWeapon.cpp.

References spriteObject::destroy(), and effect.

Here is the call graph for this function:


Member Function Documentation

virtual void equipWeapon::equipAction (  )  [protected, pure virtual]

actions to perform when the Weapon is given to a Player

Implemented in wp_boot, wp_dunce, and wp_shield.

virtual void equipWeapon::unEquipAction (  )  [protected, pure virtual]

actions to perform when the Weapon is removed from a Player's inventory

Implemented in wp_boot, wp_dunce, and wp_shield.


Member Data Documentation

spriteObject* equipWeapon::effect [protected]

a spriteObject to spawn and attach to the Player who owns this Weapon, if necessary

Definition at line 49 of file equipWeapon.h.

Referenced by wp_shield::equipAction(), wp_dunce::equipAction(), wp_boot::equipAction(), wp_dunce::unEquipAction(), wp_boot::unEquipAction(), wp_shield::weaponTick(), and ~equipWeapon().


The documentation for this class was generated from the following files:
Generated on Tue Mar 13 23:27:54 2007 for MDuel DS by  doxygen 1.5.1-p1