#include "CS_LifeCapsule.h"

CS_LifeCapsule::CS_LifeCapsule()
{
	ani.png = L"CS_CaveStoryMod";
	ani.sprite_index = L"ls_lifecapsule";
	drawBeforeOtherEntity = true;
	cbRect.top = 8;
	cbRect.left = cbRect.right = cbRect.bottom = 6;
}

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

	if (ani_no > 1)
		ani_no = 0;
}

std::shared_ptr<Entity> CreateCS_LifeCapsule()
{
	return std::make_shared<CS_LifeCapsule>();
}
