DynamiteStick Class Reference

#include <dynamite.h>

Inheritance diagram for DynamiteStick:

Inheritance graph
[legend]
Collaboration diagram for DynamiteStick:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DynamiteStick (ExplosiveWeaponConfig &cfg, WeaponLauncher *p_launcher)
void Shoot (double strength)
void Refresh ()

Protected Member Functions

void ShootSound ()
void SignalExplosion ()
void SignalOutOfMap ()
void SignalDrowning ()

Private Attributes

int channel

Detailed Description

Definition at line 34 of file dynamite.h.


Constructor & Destructor Documentation

DynamiteStick::DynamiteStick ( ExplosiveWeaponConfig cfg,
WeaponLauncher p_launcher 
)

Definition at line 38 of file dynamite.cpp.

00039                                                           :
00040   WeaponProjectile("dynamite_bullet", cfg, p_launcher)
00041 {
00042   channel = -1;
00043   explode_with_collision = false;
00044 
00045   image->animation.SetLoopMode(false);
00046   SetSize(image->GetSize());
00047   SetTestRect (0, 0, 2, 3);
00048 }

Here is the call graph for this function:


Member Function Documentation

void DynamiteStick::Refresh (  )  [virtual]

Reimplemented from WeaponProjectile.

Definition at line 61 of file dynamite.cpp.

00062 {
00063   image->Update();
00064   if (image->IsFinished()) Explosion();
00065 }

Here is the call graph for this function:

void DynamiteStick::Shoot ( double  strength  )  [virtual]

Reimplemented from WeaponProjectile.

Definition at line 50 of file dynamite.cpp.

00051 {
00052   unsigned int delay = (1000 * WeaponProjectile::GetTotalTimeout())/image->GetFrameCount();
00053   image->SetFrameSpeed(delay);
00054 
00055   image->Scale(ActiveCharacter().GetDirection(), 1);
00056   image->SetCurrentFrame(0);
00057   image->Start();
00058   WeaponProjectile::Shoot(strength);
00059 }

Here is the call graph for this function:

void DynamiteStick::ShootSound (  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 67 of file dynamite.cpp.

00068 {
00069   channel = jukebox.Play("share","weapon/dynamite_fuze", -1);
00070 }

Here is the call graph for this function:

void DynamiteStick::SignalDrowning (  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 82 of file dynamite.cpp.

00083 {
00084   jukebox.Stop(channel);
00085 }

Here is the call graph for this function:

void DynamiteStick::SignalExplosion (  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 72 of file dynamite.cpp.

00073 {
00074   jukebox.Stop(channel);
00075 }

Here is the call graph for this function:

void DynamiteStick::SignalOutOfMap (  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 77 of file dynamite.cpp.

00078 {
00079   jukebox.Stop(channel);
00080 }

Here is the call graph for this function:


Member Data Documentation

int DynamiteStick::channel [private]

Definition at line 36 of file dynamite.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 1 13:44:57 2007 for Wormux by  doxygen 1.4.7