#pragma once
#include "PlaneObject.h"


class cAniPlane : public cPlaneObject
{
public:
	cAniPlane();
	~cAniPlane();

	virtual bool Create( NiTexture* pTexture, 
						short screenX, short screenY, unsigned short screenW, unsigned short screenH,
						unsigned short texLeft, unsigned short texTop, unsigned short texRight, unsigned short texBottom );

	void Process( unsigned long accumTime );

	virtual void Draw();

	void BeginAnimation();
	void EndAnimation();

	void SetAnimationInfo( short totalFrame, unsigned long timeOut, bool loop );


protected:

	///
	short			mFrames;	/// 프레임수

	short			mCurFrame;	/// 현재 프레임

	bool			mLoop;		/// 애니메이션 한바퀴 돌리기

	bool			mBeginAnim;	/// 애니사용여부

	/// frame texture size
	unsigned short	mTexX;
	unsigned short	mTexY;

	unsigned short	mTexW;
	unsigned short	mTexH;

	unsigned int	mColumCount;

	/// 타이머
	unsigned long	mTimeOut;	/// 애니메이션 갱신 시간
	unsigned long	mLastAccumTime;
};