#pragma once

//-----------------------------------------------------
// Include Files
//-----------------------------------------------------
#include "Matrix2D.h"
#include "Item.h"
#include "Hero.h"
class ResourceLoader;
class Painter;
class InputState;
class Image;
class CollisionMesh;

//-----------------------------------------------------
// Arrow Class									
//-----------------------------------------------------
class Arrow : public Item
{
public:
	Arrow(ResourceLoader* resourceLoaderPtr,const String& imageName, int healthModifier);
	virtual ~Arrow();

	void Paint(Painter *painterPtr, Matrix2D matTransform);
	void Tick(InputState *inputStatePtr);
	void Tick(InputState *inputStatePtr,Hero *hero);
	void SetVisible(bool visible);
	bool IsVisible() const;
	void Fire();
	bool ReadyToFire() const;
	void Reset();
	void SetHeadingDirection(bool headingRight);
private: 
	//-------------------------------------------------
	// Datamembers								
	//-------------------------------------------------
	double m_ArrowMass;
	double m_ArrowFireAngle;
	bool m_Visible;
	bool m_Fire;
	bool m_HeadingRight;

	//States
	static const int STATE_WAITING=-1;
	static const int STATE_FLYING=0;
	static const int STATE_HIT=1;

	// -------------------------
	// Disabling default copy constructor and default 
	// assignment operator.
	// -------------------------
	Arrow(const Arrow& yRef);									
	Arrow& operator=(const Arrow& yRef);	
};