#include "CS_PuppySleeping.h"
#include "CS_PeZzz.h"

CS_PuppySleeping::CS_PuppySleeping()
{
	ani.png = L"CS_CaveStoryMod";
	//ÆôÓÃÅö×²
	cbRect.enableCbRect = true;
	cbRect.enableSoild = true;
	//ÉèÖÃÅö×²¿ò
	cbRect.left = cbRect.right = 4;
	cbRect.top = 8;
	cbRect.bottom = 8;
}

void CS_PuppySleeping::Step()
{
	if (++act_wait > 100)
	{
		act_wait = 0;
		SetPeCS_Zzz(shared_from_this(), x, y);
	}
}

void CS_PuppySleeping::SetState(int stateID, int lr)
{
	this->lr = lr;
	ani.sprite_index = lr == 0 ? L"ls_puppy_sleeping_l" : L"ls_puppy_sleeping_r";
}

std::shared_ptr<Entity> CreateCS_PuppySleeping()
{
	return std::make_shared<CS_PuppySleeping>();
}
