PetrolBarrel Class Reference

#include <barrel.h>

Inheritance diagram for PetrolBarrel:

Inheritance graph
[legend]
Collaboration diagram for PetrolBarrel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PetrolBarrel ()
 ~PetrolBarrel ()
void Draw ()
void Refresh ()

Protected Member Functions

void SignalGhostState (bool was_already_dead)

Private Attributes

Spriteimg

Detailed Description

Definition at line 29 of file barrel.h.


Constructor & Destructor Documentation

PetrolBarrel::PetrolBarrel (  ) 

Definition at line 30 of file barrel.cpp.

00030                            : PhysicalObj("barrel")
00031 {
00032   Profile *res = resource_manager.LoadXMLProfile( "graphism.xml", false);
00033   img= resource_manager.LoadSprite( res, "objet/barrel");
00034   resource_manager.UnLoadXMLProfile(res);
00035 
00036   life_points = 40;
00037 
00038   SetCollisionModel(false, true, true);
00039   SetSize(img->GetSize());
00040   SetTestRect (1, 1, 2, 2);
00041 }

Here is the call graph for this function:

PetrolBarrel::~PetrolBarrel (  ) 

Definition at line 43 of file barrel.cpp.

00044 {
00045   delete img;
00046 }


Member Function Documentation

void PetrolBarrel::Draw (  )  [virtual]

Implements PhysicalObj.

Definition at line 48 of file barrel.cpp.

00049 {
00050   img->Update();
00051   img->Draw(GetPosition());
00052 }

Here is the call graph for this function:

void PetrolBarrel::Refresh (  )  [virtual]

Implements PhysicalObj.

Definition at line 54 of file barrel.cpp.

00055 {
00056 }

void PetrolBarrel::SignalGhostState ( bool  was_already_dead  )  [protected, virtual]

Reimplemented from Physics.

Definition at line 58 of file barrel.cpp.

00059 {
00060   ParticleEngine::AddNow(GetCenter() , 20, particle_FIRE, true);
00061   ApplyExplosion(GetCenter(), GameMode::GetInstance()->barrel_explosion_cfg);
00062 }

Here is the call graph for this function:


Member Data Documentation

Sprite* PetrolBarrel::img [private]

Definition at line 31 of file barrel.h.


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