#include "GameFlash.h"

void GameFlash::Init(MyDX11Renderer* pRenderer, MyView* pView)
{
	this->pRenderer = pRenderer;
	this->pView = pView;
}

void GameFlash::Step()
{
	if (flash_counter > 0)
		flash_counter--;
	bScreenFlashDraw = (flash_counter / 2 % 2 != 0);
}

void GameFlash::Draw()
{
	if (bScreenFlashDraw)
		pRenderer->RenderClear(1, 1, 1, 1);
}

void GameFlash::Reset()
{
	flash_counter = 0;
}

void GameFlash::SetScreenFlash(int times)
{
	flash_counter = times;
}
