#include "CS_Cup.h"

CS_Cup::CS_Cup()
{
	ani.png = L"CS_CaveStoryMod";
	ani.sprite_index = L"ls_cup";
	drawBeforeOtherEntity = true;
}

void CS_Cup::Step()
{
	switch (stateID)
	{
	case 0://不动
		break;
	case 1://漂浮到上方
		y += (dstFloatY - y) / 16;
		break;
	}
	//执行运动
	Entity::Step();
}

void CS_Cup::SetState(int stateID, int lr)
{
	this->lr = lr;
	this->stateID = stateID;
	switch (stateID)
	{
	case 1:
		dstFloatY = y - 32;
		break;
	}
}

void CS_Cup::SetState(std::wstring stateName, int lr)
{
	if (stateName == L"get")
		SetState(1, lr);
}

std::shared_ptr<Entity> CreateCS_Cup()
{
	return std::make_shared<CS_Cup>();
}
