#include "CS_PuppyHurt.h"
const int CS_PuppySTATENAME_HURT = GetNextEntityStateID();
CS_PuppyHurt::CS_PuppyHurt()
{
	stateID = CS_PuppySTATENAME_HURT;
}

void CS_PuppyHurt::State()
{
	auto we = e.lock();
	if (!we)
		return;

	we->ani.sprite_index = we->lr == 0 ? L"mc_puppy_hurt_l" : L"mc_puppy_hurt_r";
}

void CS_PuppyHurt::ChangeStateMsg(int stateID)
{
	if (stateID == GetStateID())
	{
		auto we = e.lock();
		if (!we)
			return;

		auto mychar = std::static_pointer_cast<MyCharEntity>(we);
		enable = true;
		mychar->action_timecounter = 30;
	}
	else
		enable = false;
}
