#include <Sheep.h>
Public Member Functions | |
CSheep () | |
Standard constructor. | |
CSheep (CXFileEntity *model) | |
Extended constructor. Takes preloaded skinned model to avoid multiple loading for many sheep. | |
~CSheep () | |
Standard destructor. | |
bool | Init (HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, IDirectSound8 *pDS) |
Init function loads skinned model (CXFileEntity) and sheep 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 sheep (position, facing, etc..). | |
void | PlaySoundMove () |
Play sound when pushing sheep. | |
void | PlaySoundDeath () |
Play sound when sheep dies. |
CSheep holds animated skinned mesh instance of a sheep, adding sound and behaviour to it. Sheep are passive game actors, they just stand until being pushed or taken by dwarfs.
CSheep::CSheep | ( | ) |
Standard constructor.
CSheep::CSheep | ( | CXFileEntity * | model | ) |
Extended constructor. Takes preloaded skinned model to avoid multiple loading for many sheep.
CSheep::~CSheep | ( | ) |
Standard destructor.
bool CSheep::Init | ( | HWND | hWnd, | |
LPDIRECT3DDEVICE9 | pd3dDevice, | |||
IDirectSound8 * | pDS | |||
) |
bool CSheep::InitSounds | ( | HWND | hWnd, | |
IDirectSound8 * | pDS | |||
) |
Create sounds for dwarf instance.
void CSheep::OnFrameMove | ( | LPDIRECT3DDEVICE9 | pd3dDevice, | |
float | fElapsedTime, | |||
D3DXMATRIXA16 * | matWorld | |||
) |
Move animated model.
void CSheep::OnRender | ( | LPDIRECT3DDEVICE9 | pd3dDevice | ) |
Render skinned model.
void CSheep::Restart | ( | ) |
Restart sheep (position, facing, etc..).
void CSheep::PlaySoundMove | ( | ) |
Play sound when pushing sheep.
void CSheep::PlaySoundDeath | ( | ) |
Play sound when sheep dies.