#include "LogoState.h"

LogoState::LogoState(GameWindow *win) : GameState(win, L"logo")
{
}

LogoState::~LogoState(void)
{
}

void LogoState::Initial()
{
	m_image.Create(GetWindow()->GetGraphics(), GetResource(RC_Logo));
	m_timer.SetDelayValue(1500);
}

void LogoState::Update(float dt)
{
	m_timer.Update(dt);
	if(m_timer.CheckDelay())
	{
		GetWindow()->GetStateManager().OutroState();
		GetWindow()->GetStateManager().IntroState(L"menu");
	}
}

void LogoState::Draw(float dt)
{
	m_image.Draw(200 - 180 / 2, 200 - 150 / 2);
}

void LogoState::Destroy()
{
	m_image.Destroy();
}