WeaponBullet Class Reference

#include <launcher.h>

Inheritance diagram for WeaponBullet:

Inheritance graph
[legend]
Collaboration diagram for WeaponBullet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WeaponBullet (const std::string &name, ExplosiveWeaponConfig &cfg, WeaponLauncher *p_launcher)
virtual ~WeaponBullet ()
virtual void Refresh ()

Protected Member Functions

virtual void SignalGroundCollision ()
virtual void SignalOutOfMap ()
virtual void SignalObjectCollision (PhysicalObj *obj)
void DoExplosion ()

Detailed Description

Definition at line 83 of file launcher.h.


Constructor & Destructor Documentation

WeaponBullet::WeaponBullet ( const std::string &  name,
ExplosiveWeaponConfig cfg,
WeaponLauncher p_launcher 
)

Definition at line 45 of file launcher.cpp.

00047                                                         :
00048   WeaponProjectile(name, cfg, p_launcher)
00049 {
00050   explode_colliding_character = true;
00051   ResetTimeOut();
00052 }

Here is the call graph for this function:

virtual WeaponBullet::~WeaponBullet (  )  [inline, virtual]

Definition at line 89 of file launcher.h.

00089 {};


Member Function Documentation

void WeaponBullet::DoExplosion (  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 87 of file launcher.cpp.

00088 {
00089   Point2i pos = GetCenter();
00090   ApplyExplosion (pos, cfg, "", false, ParticleEngine::LittleESmoke);
00091 }

Here is the call graph for this function:

void WeaponBullet::Refresh (  )  [virtual]

Reimplemented from WeaponProjectile.

Definition at line 81 of file launcher.cpp.

00082 {
00083   WeaponProjectile::Refresh();
00084   image->SetRotation_rad(GetSpeedAngle());
00085 }

Here is the call graph for this function:

void WeaponBullet::SignalGroundCollision (  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 55 of file launcher.cpp.

00056 {
00057   jukebox.Play("share", "weapon/ricoche1");
00058   WeaponProjectile::SignalGroundCollision();
00059   launcher->IncMissedShots();
00060 }

Here is the call graph for this function:

void WeaponBullet::SignalObjectCollision ( PhysicalObj obj  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 68 of file launcher.cpp.

00069 {
00070   if (typeid(*obj) != typeid(Character)) {
00071     obj->AddDamage(cfg.damage);
00072     Explosion();
00073   } else {
00074     Character * tmp = (Character*)(obj);
00075     tmp -> SetEnergyDelta (-cfg.damage);
00076     tmp -> AddSpeed (2, GetSpeedAngle());
00077     Ghost();
00078   }
00079 }

Here is the call graph for this function:

void WeaponBullet::SignalOutOfMap (  )  [protected, virtual]

Reimplemented from WeaponProjectile.

Definition at line 62 of file launcher.cpp.

00063 {
00064   WeaponProjectile::SignalOutOfMap();
00065   launcher->IncMissedShots();
00066 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Jan 1 14:30:27 2007 for Wormux by  doxygen 1.4.7