#pragma once
//-----------------------------------------------------
// Name, first name: Hoet, Guntran
// Group: 1DAE3
//-----------------------------------------------------

//-----------------------------------------------------
// Include Files
//-----------------------------------------------------
#include "GameEngine.h"
#include "Goomba.h"
#include "Troopa.h"
#include "EnemyMaster.h"
#include "Mario.h"

//-----------------------------------------------------
// EnemyList Class									
//-----------------------------------------------------
class EnemyList
{
private:
	EnemyList();				// Constructor
	static EnemyList* m_EnemyListPtr;

public:
	virtual ~EnemyList();		// Destructor
	static EnemyList* GetSingleton();

	//-------------------------------------------------
	// Methods - Member functions							
	//-------------------------------------------------

	void Tick(double deltaTime);
	void Paint(MATRIX3X2 matView);
	RECT2 GetAABBRect(int index);
	DOUBLE2 GetPos(int index);
	void DrawDebug(MATRIX3X2 matView);
	void Move(int index, DOUBLE2 moveValue);
	void SetVelocityToZero(int index, bool velocityX, bool velocityY);
	void IsJumpedOn(int index);
	void IsFiredOn(int index);
	void CheckDestroyers(int index);
	// return true = mario goes right
	// return false = mario goes left
	void SetDirection(int index, bool marioDir);

	// 0 = goomba
	// 1 = troopa
	int GetTypeOfEnemy(int index);

	static const int NR_OF_GOOMAS = 14;
	static const int NR_OF_TROOPAS = 1;
	static const int NR_OF_ENEMIES = NR_OF_GOOMAS + NR_OF_TROOPAS;

private: 
	//-------------------------------------------------
	// Methods								
	//-------------------------------------------------

	void LoadFromFile();
	void CreateEnemies();

	//-------------------------------------------------
	// Datamembers								
	//-------------------------------------------------

	Bitmap	*m_BmpGoombaPtr,
			*m_BmpTroopaPtr;

	EnemyMaster *m_EnemyPtrArr[NR_OF_ENEMIES];

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


