#include "StdAfx.h"
#include "BOMB.h"


BOMB::BOMB(void)
{
	Collide = false;
	//DrawImage	=	new	IMAGE();
	Res	=	new	IMAGE[3];
	Res[0].LoadImageFromFile(L"Texture/bomb_1.png");
	Res[1].LoadImageFromFile(L"Texture/bomb_2.png");
	Res[2].LoadImageFromFile(L"Texture/bomb_3.png");

	Index = 0;
	Steep = 1;
	Time = GetTickCount();
	TimeLive = GetTickCount();
	MoveSpeed = 100;

	DrawImage = Res[0];

	Boom = false;
}

void	BOMB::Draw(void)
{
	if(TimeLive < GetTickCount()-2500)
		Boom = true;

	if(GetTickCount() > Time+MoveSpeed ) 
		{
			Time = GetTickCount();
	//		if(Index == 0)
	//			Steep = 1;

			if(Index == 2)
				Index = 0;


			Index += Steep;
		}
	DrawImage.Texture = Res[Index].Texture;

	DrawImage.Draw();
}
void	BOMB::SetPosition(float x,float y)
{
	Position.x = x;
	Position.y = y;
	DrawImage.SetPosition(x,y);
}


BOMB::~BOMB(void)
{
}
