AnvilLauncher Class Reference

#include <anvil.h>

Inheritance diagram for AnvilLauncher:

Inheritance graph
[legend]
Collaboration diagram for AnvilLauncher:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AnvilLauncher ()
void ChooseTarget (Point2i mouse_pos)

Protected Member Functions

WeaponProjectileGetProjectileInstance ()
bool p_Shoot ()

Private Attributes

Point2i target
bool target_chosen

Detailed Description

Definition at line 44 of file anvil.h.


Constructor & Destructor Documentation

AnvilLauncher::AnvilLauncher (  ) 

Definition at line 71 of file anvil.cpp.

00071                              :
00072     WeaponLauncher(WEAPON_ANVIL, "anvil_launcher", new ExplosiveWeaponConfig(), VISIBLE_ONLY_WHEN_INACTIVE)
00073 {
00074   m_name = _("Anvil");
00075   mouse_character_selection = false;
00076   can_be_used_on_closed_map = false;
00077   ReloadLauncher();
00078   target_chosen = false;
00079 }

Here is the call graph for this function:


Member Function Documentation

void AnvilLauncher::ChooseTarget ( Point2i  mouse_pos  )  [virtual]

Reimplemented from Weapon.

Definition at line 81 of file anvil.cpp.

00082 {
00083   mouse_pos.y = 0;
00084   target = mouse_pos - (projectile->GetSize() / 2);
00085   target_chosen = true;
00086   Shoot();
00087 }

Here is the call graph for this function:

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

Implements WeaponLauncher.

Definition at line 101 of file anvil.cpp.

00102 {
00103   return dynamic_cast<WeaponProjectile *>
00104       (new Anvil(cfg(),dynamic_cast<WeaponLauncher *>(this)));
00105 }

Here is the call graph for this function:

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

Reimplemented from WeaponLauncher.

Definition at line 89 of file anvil.cpp.

00090 {
00091   if(!target_chosen)
00092     return false;
00093   projectile->SetXY(target);
00094   lst_objects.AddObject(projectile);
00095   camera.FollowObject(projectile,true,true);
00096   projectile = NULL;
00097   ReloadLauncher();
00098   return true;
00099 }

Here is the call graph for this function:


Member Data Documentation

Point2i AnvilLauncher::target [private]

Definition at line 47 of file anvil.h.

bool AnvilLauncher::target_chosen [private]

Definition at line 48 of file anvil.h.


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