#include "CS_QuoteFaceToBack.h"
#include "CS_Quote.h"
const int CS_QuoteSTATENAME_FACETOBACK = ++entityStateID;
CS_QuoteFaceToBack::CS_QuoteFaceToBack()
{
	stateID = CS_QuoteSTATENAME_FACETOBACK;
}

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

	auto mychar = std::static_pointer_cast<CS_Quote>(we);
	if (mychar->fishState)
		we->ani.sprite_index = we->lr == 0 ? L"mc_quotefish_back_l" : L"mc_quotefish_back_r";
	else
		we->ani.sprite_index = we->lr == 0 ? L"mc_quote_back_l" : L"mc_quote_back_r";
}

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