#include <anvil.h>
Inheritance diagram for Anvil:
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 |
Definition at line 31 of file anvil.h.
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 }
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 }
uint Anvil::merge_time [private] |