#include "CS_PlayerBarrier.h"

CS_PlayerBarrier::CS_PlayerBarrier()
{
	cbRect.enableSelfSoild = true;
}

void CS_PlayerBarrier::Init(std::weak_ptr<Entity> self)
{
	if (el.arg.length() && ParseInts(el.arg.c_str(), argbuff))
	{
		if (argbuff.size() == 4)
		{
			cbRect.left = 16.0f * argbuff[0];
			cbRect.right = 16.0f * argbuff[1];
			cbRect.top = 16.0f * argbuff[2];
			cbRect.bottom = 16.0f * argbuff[3];
		}
	}
	Entity::Init(self);
}

std::shared_ptr<Entity> CreateCS_PlayerBarrier()
{
	return std::make_shared<CS_PlayerBarrier>();
}
