#include "CS_Poker.h"
#include "CS_PeSmoke.h"
CS_Poker::CS_Poker()
{
	ani.png = L"CS_CaveStoryMod";
	ani.sprite_index = L"ls_poker";
	drawBeforeOtherEntity = true;
}

void CS_Poker::Step()
{
	if (bSetSmoke)
	{
		bSetSmoke = false;
		SetCS_PeSmoke(shared_from_this(), x, y, 2);
		gameFunc->PlaySound(L"CS_070_expl_small");
	}
}

void CS_Poker::SetState(std::wstring stateName, int lr)
{
	if (stateName == L"normal" || stateName == L"stacked")
		ani.image_index = 0;
	else if (stateName == L"collapsed")
	{
		ani.image_index = 1;
		bSetSmoke = true;
	}
}

std::shared_ptr<Entity> CreateCS_Poker()
{
	return std::make_shared<CS_Poker>();
}
