CDwarf Class Reference

Dwarf class. More...

#include <Dwarf.h>

Collaboration diagram for CDwarf:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CDwarf ()
 Standard constructor.
 CDwarf (CXFileEntity *model)
 Extended constructor. Takes preloaded skinned model to avoid multiple loading for many dwarfs.
 ~CDwarf ()
 Standard destructor.
bool Init (HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, IDirectSound8 *pDS)
 Init function loads skinned model (CXFileEntity) and dwarf specific sounds.
bool InitSounds (HWND hWnd, IDirectSound8 *pDS)
 Create sounds for dwarf instance.
void OnFrameMove (LPDIRECT3DDEVICE9 pd3dDevice, float fElapsedTime, D3DXMATRIXA16 *matWorld)
 Move animated model.
void OnRender (LPDIRECT3DDEVICE9 pd3dDevice)
 Render skinned model.
void Restart ()
 Restart dwarf (position, facing, etc..).
void StartPickAnim ()
 Dwarf goes into picking animation.
void GetInTheGame ()
 Places dwarf on the field and directs him toward closest sheep.
void DieOut ()
 Dwarf dies and dissapears. Reset his attribute for new appearance.
void Move (float chunk, double fTime)
 While OnFrameMove animates dwarf in place, this function moves him arround depending on his condition. If dwarf is hit, he flies and dies.
void SnatchSheep ()
 Snatch sheep changes dwarf animation, direction of moving, and attaches sheep to this dwarf.
void PlaySoundRikoshetDying ()
 Play sound of dying dwarf when he flies up in the air.
void PlaySoundBouncingDying ()
 Play sound of dying dwarf when he drops down to the ground bouncing.


Detailed Description

Dwarf class.

CDwarf holds animated skinned mesh instance of a dwarf, adding sound and behaviour to it. Dwarfs move toward sheep and they are trying to snatch them.

Author:
Petar Bajic
Date:
January, 16 2007.

Constructor & Destructor Documentation

CDwarf::CDwarf (  ) 

Standard constructor.

Author:
Petar Bajic
Date:
January, 16 2007.

CDwarf::CDwarf ( CXFileEntity model  ) 

Extended constructor. Takes preloaded skinned model to avoid multiple loading for many dwarfs.

Author:
Petar Bajic
Date:
January, 16 2007.

CDwarf::~CDwarf (  ) 

Standard destructor.

Author:
Petar Bajic
Date:
January, 16 2007.


Member Function Documentation

bool CDwarf::Init ( HWND  hWnd,
LPDIRECT3DDEVICE9  pd3dDevice,
IDirectSound8 *  pDS 
)

Init function loads skinned model (CXFileEntity) and dwarf specific sounds.

Author:
Petar Bajic
Date:
January, 16 2007.

bool CDwarf::InitSounds ( HWND  hWnd,
IDirectSound8 *  pDS 
)

Create sounds for dwarf instance.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::OnFrameMove ( LPDIRECT3DDEVICE9  pd3dDevice,
float  fElapsedTime,
D3DXMATRIXA16 *  matWorld 
)

Move animated model.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::OnRender ( LPDIRECT3DDEVICE9  pd3dDevice  ) 

Render skinned model.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::Restart (  ) 

Restart dwarf (position, facing, etc..).

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::StartPickAnim (  ) 

Dwarf goes into picking animation.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::GetInTheGame (  ) 

Places dwarf on the field and directs him toward closest sheep.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::DieOut (  ) 

Dwarf dies and dissapears. Reset his attribute for new appearance.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::Move ( float  chunk,
double  fTime 
)

While OnFrameMove animates dwarf in place, this function moves him arround depending on his condition. If dwarf is hit, he flies and dies.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::SnatchSheep (  ) 

Snatch sheep changes dwarf animation, direction of moving, and attaches sheep to this dwarf.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::PlaySoundRikoshetDying (  ) 

Play sound of dying dwarf when he flies up in the air.

Author:
Petar Bajic
Date:
January, 16 2007.

void CDwarf::PlaySoundBouncingDying (  ) 

Play sound of dying dwarf when he drops down to the ground bouncing.

Author:
Petar Bajic
Date:
January, 16 2007.


The documentation for this class was generated from the following files:
Generated on Wed Mar 26 16:00:54 2008 for Turtle Shepherd by  doxygen 1.5.3