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

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

	we->ani.sprite_index = we->lr == 0 ? L"mc_santafish_hurt_l" : L"mc_santafish_hurt_r";
}

void CS_SantaFishHurt::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;
}
