#include <air_attack.h>
Inheritance diagram for AirAttack:
Public Member Functions | |
AirAttack () | |
virtual void | ChooseTarget (Point2i mouse_pos) |
Protected Member Functions | |
bool | p_Shoot () |
void | Refresh () |
Private Member Functions | |
AirAttackConfig & | cfg () |
Private Attributes | |
Point2i | target |
bool | target_chosen |
Definition at line 71 of file air_attack.h.
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 }
AirAttackConfig & AirAttack::cfg | ( | ) | [private] |
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 }
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.