Gun Class Reference

#include <gun.h>

Inheritance diagram for Gun:

Inheritance graph
[legend]
Collaboration diagram for Gun:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Gun ()

Protected Member Functions

bool p_Shoot ()
WeaponProjectileGetProjectileInstance ()

Detailed Description

Definition at line 41 of file gun.h.


Constructor & Destructor Documentation

Gun::Gun (  ) 

Definition at line 51 of file gun.cpp.

00051          : WeaponLauncher(WEAPON_GUN, "gun", new ExplosiveWeaponConfig())
00052 {
00053   m_name = _("Gun");
00054   m_weapon_fire = new Sprite(resource_manager.LoadImage(weapons_res_profile,m_id+"_fire"));
00055   m_weapon_fire->EnableRotationCache(32);
00056   ReloadLauncher();
00057 }

Here is the call graph for this function:


Member Function Documentation

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

Implements WeaponLauncher.

Definition at line 59 of file gun.cpp.

00060 {
00061   return dynamic_cast<WeaponProjectile *>
00062       (new GunBullet(cfg(),dynamic_cast<WeaponLauncher *>(this)));
00063 }

Here is the call graph for this function:

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

Reimplemented from WeaponLauncher.

Definition at line 65 of file gun.cpp.

00066 {
00067   if (m_is_active)
00068     return false;  
00069 
00070   m_is_active = true;
00071   projectile->Shoot (GUN_BULLET_SPEED);
00072   projectile = NULL;
00073   ReloadLauncher();
00074   return true;
00075 }

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:51:28 2007 for Wormux by  doxygen 1.4.7