/** 
 * \file Sheep.h
 * \brief CSheep class member functions implementation. CSheep holds model's position and facing.
 * 
 * \author Petar Bajic, MPE (C) All Rights Reserved, Homepage: www.mystic-peanut.com
 * \date January, 16 2007.
 */

#include "d3dx9.h"
#include "Sound.h"
#include "XFileEntity.h"

#ifndef MPE_SHEEP_C
#define MPE_SHEEP_C

/**
 * \brief Sheep class.
 *
 * 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.
 * \author Petar Bajic \date January, 16 2007.
 */
class CSheep
{
public:
	CSheep::CSheep();
	CSheep::CSheep(CXFileEntity* model);
	CSheep::~CSheep();

	bool Init(HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, IDirectSound8* pDS);
	bool InitSounds(HWND hWnd, IDirectSound8* pDS);
	void OnFrameMove(LPDIRECT3DDEVICE9 pd3dDevice, float fElapsedTime, D3DXMATRIXA16* matWorld);
	void OnRender(LPDIRECT3DDEVICE9 pd3dDevice);
	void Restart();
	void PlaySoundMove();
	void PlaySoundDeath();


	CXFileEntity*	m_Model;
	D3DXVECTOR3		m_Position;
	float			m_Facing;
	CSound*			m_MovingSound1;
	CSound*			m_MovingSound2;
	CSound*			m_DyingSound;
	bool			m_isRunning;
	bool			m_isIdle;
	bool			m_Alive;
	bool			m_BeingCarriedAway;
	bool			m_Moved;
};

#endif //MPE_SHEEP_C