#include <anvil.h>
Inheritance diagram for AnvilLauncher:
Public Member Functions | |
AnvilLauncher () | |
void | ChooseTarget (Point2i mouse_pos) |
Protected Member Functions | |
WeaponProjectile * | GetProjectileInstance () |
bool | p_Shoot () |
Private Attributes | |
Point2i | target |
bool | target_chosen |
Definition at line 44 of file anvil.h.
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:
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:
Point2i AnvilLauncher::target [private] |
bool AnvilLauncher::target_chosen [private] |