wp_hook Class Reference

#include <wp_hook.h>

Inherits Weapon.

Inheritance diagram for wp_hook:

Inheritance graph
[legend]
Collaboration diagram for wp_hook:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 wp_hook (Player *p)
virtual ~wp_hook ()
virtual void weaponTick ()
 Executed every frame to fire the Weapon if it is a held-fire Weapon and firing.

Protected Member Functions

virtual void weaponFireAction ()
 Actions to perform when the Weapon is fired.
virtual void stopFiring ()
 Called by a Player to stop this Weapon from firing, usually to stop a held-fire Weapon's weaponFireAction().

Protected Attributes

u8 floorGrabTimer

Detailed Description

Definition at line 26 of file wp_hook.h.


Constructor & Destructor Documentation

wp_hook::wp_hook ( Player p  )  [inline]

Definition at line 29 of file wp_hook.h.

References Weapon::ammo, Weapon::bHeldFire, Weapon::canFireCrouching, Weapon::canFireInAir, Weapon::canFireStanding, Weapon::canMoveWhileFiring, Weapon::myType, and Pickup::PT_HOOK.

wp_hook::~wp_hook (  )  [virtual]

Definition at line 25 of file wp_hook.cpp.

References Weapon::isFiring(), Weapon::pawn, Player::updateAnimation(), and Weapon::wasFiring().

Here is the call graph for this function:


Member Function Documentation

void wp_hook::weaponTick (  )  [virtual]

Executed every frame to fire the Weapon if it is a held-fire Weapon and firing.

Reimplemented from Weapon.

Definition at line 31 of file wp_hook.cpp.

References Weapon::bFiring, Weapon::bWasFiring, Weapon::isFiring(), massObject::isOnGround(), Player::isOnRope(), Weapon::pawn, stopFiring(), Player::updateAnimation(), Weapon::wasFiring(), and Weapon::weaponTick().

Here is the call graph for this function:

void wp_hook::weaponFireAction (  )  [protected, virtual]

Actions to perform when the Weapon is fired.

This may be only executed once for single-fire Weapons or every frame for held-fire Weapons.

Implements Weapon.

Definition at line 44 of file wp_hook.cpp.

References Player::climbRope(), floorGrabTimer, spriteManager::gameSprites, spriteObject::getFlippedh(), spriteObject::getLeft(), spriteObject::getRight(), spriteObject::gety(), Player::gm, Player::JUMPIMPULSE, Player::justTouchingRope(), Weapon::pawn, spriteObject::setFrame(), spriteObject::setvx(), spriteObject::setvy(), and spriteObject::TICKSPERFRAME.

Here is the call graph for this function:

void wp_hook::stopFiring (  )  [protected, virtual]

Called by a Player to stop this Weapon from firing, usually to stop a held-fire Weapon's weaponFireAction().

Reimplemented from Weapon.

Definition at line 74 of file wp_hook.cpp.

References floorGrabTimer, and Weapon::stopFiring().

Referenced by weaponTick().

Here is the call graph for this function:


Member Data Documentation

u8 wp_hook::floorGrabTimer [protected]

Definition at line 51 of file wp_hook.h.

Referenced by stopFiring(), and weaponFireAction().


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