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

//-----------------------------------------------------
// Include Files
//-----------------------------------------------------
#include "GameEngine.h"
#include "Mario.h"
#include "EnemyList.h"
#include "EntityList.h"
#include "HUD.h"
#include "Sound.h"
#include "Handy.h"
#include "Level.h"

#include "BlockList.h"

//-----------------------------------------------------
// CollisionList Class									
//-----------------------------------------------------
class CollisionList
{
private:
	CollisionList();				// Constructor
	static CollisionList* m_CollisionListPtr;

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

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

	void Tick(double deltaTime);
	void Paint(MATRIX3X2 matView);

	static const int SCORE_KILL_GOOMBA = 100;
	static const int SCORE_KILL_TROOPA = 400;

	static const int SCORE_PICKUP_COIN = 200;
	static const int SCORE_PICKUP_FLOWER = 1000;
	static const int SCORE_PICKUP_MUSHROOM = 1000;
	static const int SCORE_PICKUP_STAR = 1000;

private: 
	//-------------------------------------------------
	// Datamembers								
	//-------------------------------------------------

	bool RectIntersectTest(RECT2 r1, RECT2 r2);
	RECT2 RectIntersect(RECT2 r1, RECT2 r2);

	void MarioHToBlocksCollision();
	void MarioVToBlocksCollision();
	void MarioHToEnemiesCollision();
	void MarioVToEnemiesCollision();

	void MarioToPipeEnterance();
	void MarioToPipeExit();

	void TroopaToGoomba();

	void EnemiesToBlocksCollision();

	void EntitiyToBlockCollision();

	bool MarioToEntityCollision();

	void MarioToFlagPole();

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


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


