AirAttack Class Reference

#include <air_attack.h>

Inheritance diagram for AirAttack:

Inheritance graph
[legend]
Collaboration diagram for AirAttack:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AirAttack ()
virtual void ChooseTarget (Point2i mouse_pos)

Protected Member Functions

bool p_Shoot ()
void Refresh ()

Private Member Functions

AirAttackConfigcfg ()

Private Attributes

Point2i target
bool target_chosen

Detailed Description

Definition at line 71 of file air_attack.h.


Constructor & Destructor Documentation

AirAttack::AirAttack (  ) 

Definition at line 156 of file air_attack.cpp.

00156                      :
00157   Weapon(WEAPON_AIR_ATTACK, "air_attack",new AirAttackConfig(), ALWAYS_VISIBLE)//, plane(cfg())
00158 {  
00159   m_name = _("Air Attack");
00160   mouse_character_selection = false;
00161   can_be_used_on_closed_map = false;
00162   target_chosen = false;
00163 }


Member Function Documentation

AirAttackConfig & AirAttack::cfg (  )  [private]

Definition at line 187 of file air_attack.cpp.

00188 {
00189   return static_cast<AirAttackConfig&>(*extra_params);
00190 }

Here is the caller graph for this function:

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

Reimplemented from Weapon.

Definition at line 170 of file air_attack.cpp.

00171 {
00172   target = mouse_pos;
00173   target_chosen = true;
00174   Shoot();
00175 }

Here is the call graph for this function:

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

Implements Weapon.

Definition at line 177 of file air_attack.cpp.

00178 {
00179   if(!target_chosen)
00180     return false;
00181 
00182   Plane* plane = new Plane(cfg());
00183   plane->Shoot(cfg().speed, target);
00184   return true;
00185 }

Here is the call graph for this function:

void AirAttack::Refresh (  )  [protected, virtual]

Implements Weapon.

Definition at line 165 of file air_attack.cpp.

00166 {
00167   m_is_active = false;
00168 }


Member Data Documentation

Point2i AirAttack::target [private]

Definition at line 74 of file air_attack.h.

bool AirAttack::target_chosen [private]

Definition at line 75 of file air_attack.h.


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