#include "CS_JackDrown.h"
const int CS_JackSTATENAME_DROWN = ++entityStateID;
CS_JackDrown::CS_JackDrown()
{
	stateID = CS_JackSTATENAME_DROWN;
}

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

	we->ani.sprite_index = we->lr == 0 ? L"mc_jack_hurt_l" : L"mc_jack_hurt_r";
}

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