#include "CS_Tank.h"

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

void CS_Tank::SetState(int stateID, int lr)
{
	if (el.arg.length() > 0)
	{
		if(el.arg == L"red")
			ani.sprite_index = L"ls_tank_red";
		else if (el.arg == L"red_opened")
			ani.sprite_index = L"ls_tank_red_opened";
		else if(el.arg == L"blue")
			ani.sprite_index = L"ls_tank_blue";
		else if (el.arg == L"yellow")
			ani.sprite_index = L"ls_tank_yellow";
	}
	else
		ani.sprite_index = L"ls_tank_red";
}

std::shared_ptr<Entity> CreateCS_Tank()
{
	return std::make_shared<CS_Tank>();
}
