Anvil Class Reference

#include <anvil.h>

Inheritance diagram for Anvil:

Inheritance graph
[legend]
Collaboration diagram for Anvil:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Anvil (ExplosiveWeaponConfig &cfg, WeaponLauncher *p_launcher)
void Refresh ()

Protected Member Functions

void SignalObjectCollision (PhysicalObj *obj)
void SignalGroundCollision ()

Private Attributes

uint merge_time

Detailed Description

Definition at line 31 of file anvil.h.


Constructor & Destructor Documentation

Anvil::Anvil ( ExplosiveWeaponConfig cfg,
WeaponLauncher p_launcher 
)

Definition at line 37 of file anvil.cpp.

00038                                           :
00039   WeaponProjectile ("anvil", cfg, p_launcher)
00040 {
00041   explode_with_collision = false;
00042   explode_colliding_character = false;
00043   merge_time = 0;
00044 }


Member Function Documentation

void Anvil::Refresh (  )  [virtual]

Reimplemented from WeaponProjectile.

Definition at line 59 of file anvil.cpp.

00060 {
00061   if(merge_time != 0 && merge_time < Time::GetInstance()->Read()) {
00062     world.MergeSprite(GetPosition(),image);
00063     Ghost();
00064   } else {
00065     WeaponProjectile::Refresh();
00066   }
00067 }

Here is the call graph for this function:

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

Reimplemented from WeaponProjectile.

Definition at line 54 of file anvil.cpp.

00055 {
00056   merge_time = Time::GetInstance()->Read() + 5000;
00057 }

Here is the call graph for this function:

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

Reimplemented from WeaponProjectile.

Definition at line 46 of file anvil.cpp.

00047 {
00048   if(typeid(*obj) == typeid(Character)) {
00049     Character * tmp = (Character *)(obj);
00050     tmp -> SetEnergyDelta (-200);
00051   }
00052 }


Member Data Documentation

uint Anvil::merge_time [private]

Definition at line 34 of file anvil.h.


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