#include "cGame.h"
#include "cBrick.h"
#include "MediaVars.h"

cBrick::cBrick(cGame *g, double xx, double yy)
{
	game = g;
	x = xx;
	y = yy;
	depth = 0;
	collide.SetPosition(xx,yy);
	collide.SetLeft(0);
	collide.SetTop(20);
	collide.SetRight(64);
	collide.SetBottom(64);
	objectType = BRICK;
	depth = (collide.GetY()+20);
	destroyed = false;
	if (game->GetCurrentLevel() == 1)
		texture = sprBrick;
	else
		texture = sprUnderBrick;
}

void cBrick::Update()
{
}

void cBrick::Draw()
{
	texture->SetPosition((float)(int)x,(float)(int)y);
	game->GetWindow()->Draw(*texture);
}