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

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

	const wchar_t* move = L"";
	if (we->ud == -1)
		move = we->lr == 0 ? L"mc_puppyfish_swim_lu" : L"mc_puppyfish_swim_ru";
	else if (we->ud == 0)
		move = we->lr == 0 ? L"mc_puppyfish_swim_l" : L"mc_puppyfish_swim_r";
	else if (we->ud == 1)
		move = we->lr == 0 ? L"mc_puppyfish_swim_ld" : L"mc_puppyfish_swim_rd";
	we->ani.sprite_index = move;
}

void CS_PuppyFishSwim::ChangeStateMsg(int stateID)
{
	if (stateID == GetStateID())
		enable = true;
	else
		enable = false;
}
