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

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

	we->ani.sprite_index = we->lr == 0 ? L"mc_king_hurt2_l" : L"mc_king_hurt2_r";
}

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