#include "CS_PeBubbleBrust.h"

CS_PeBubbleBrust::CS_PeBubbleBrust()
{
	type = 3;
	ani.png = L"CS_CaveStoryMod";
	ani.sprite_index = L"pe_bubble_brust";
}

void CS_PeBubbleBrust::Step()
{
	auto& ani_no = ani.image_index;
	if (++ani_wait > 2)
	{
		ani_wait = 0;
		if (++ani_no > 3)
			Destroy();
	}
}

void SetCS_PeBubbleBrust(std::shared_ptr<Entity> parent, float x, float y)
{
	auto pe = std::make_shared<CS_PeBubbleBrust>();
	pe->x = x;
	pe->y = y;
	parent->gameFunc->SetEntity(parent, pe);
}
