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

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

	we->ani.sprite_index = we->lr == 0 ? L"mc_santa_hurt_l" : L"mc_santa_hurt_r";
}

void CS_SantaDrown::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 = mychar->action_timecounter_max;
	}
	else
		enable = false;
}
