Mine Class Reference

#include <mine.h>

Inheritance diagram for Mine:

Inheritance graph
[legend]
Collaboration diagram for Mine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Mine ()
MineConfigcfg ()

Protected Member Functions

WeaponProjectileGetProjectileInstance ()
bool p_Shoot ()

Private Member Functions

void Add (int x, int y)

Detailed Description

Definition at line 82 of file mine.h.


Constructor & Destructor Documentation

Mine::Mine (  ) 

Definition at line 182 of file mine.cpp.

00182            : WeaponLauncher(WEAPON_MINE, "minelauncher", MineConfig::GetInstance(), VISIBLE_ONLY_WHEN_INACTIVE)
00183 {
00184   m_name = _("Mine");
00185   ReloadLauncher();
00186 }

Here is the call graph for this function:


Member Function Documentation

void Mine::Add ( int  x,
int  y 
) [private]

Definition at line 203 of file mine.cpp.

00204 {
00205   projectile -> SetXY ( Point2i(x, y) );
00206   projectile -> SetOverlappingObject(&ActiveCharacter());
00207 
00208   Point2d speed_vector;
00209   ActiveCharacter().GetSpeedXY(speed_vector);
00210   projectile -> SetSpeedXY (speed_vector);
00211   lst_objects.AddObject (projectile);
00212   projectile = NULL;
00213   ReloadLauncher();
00214 }

Here is the call graph for this function:

Here is the caller graph for this function:

MineConfig & Mine::cfg (  ) 

Reimplemented from WeaponLauncher.

Definition at line 216 of file mine.cpp.

00217 {
00218   return static_cast<MineConfig&>(*extra_params);
00219 }

Here is the caller graph for this function:

WeaponProjectile * Mine::GetProjectileInstance (  )  [protected, virtual]

Implements WeaponLauncher.

Definition at line 188 of file mine.cpp.

00189 {
00190   return dynamic_cast<WeaponProjectile *>
00191       (new ObjMine(cfg(), dynamic_cast<WeaponLauncher *>(this)));
00192 }

Here is the call graph for this function:

bool Mine::p_Shoot (  )  [protected, virtual]

Reimplemented from WeaponLauncher.

Definition at line 194 of file mine.cpp.

00195 {
00196   int x,y;
00197   PosXY (x,y);
00198   Add (x, y);
00199 
00200   return true;
00201 }

Here is the call graph for this function:


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