#include "CS_TeleporterLargeHeadHotWind.h"

CS_TeleporterLargeHeadHotWind::CS_TeleporterLargeHeadHotWind()
{
	type = 3;
	//启用碰撞
	cbRect.enableCbRect = true;
	cbRect.left = cbRect.right = dw = (float)Random(1, 4);
	cbRect.top = cbRect.bottom = dh = (float)Random(4, 16);
	vy = -0x800 / ts;
	//cbRect.ignoreMovePlatform = true;
}

void CS_TeleporterLargeHeadHotWind::Step()
{
	fillList.clear();
	BYTE a = (BYTE)(alpha * 0x80);
	AddFillRect(fillList, 0, -dw, -dh, dw, dh,
		RGBA(0xff, 0x68, 0, 0), RGBA(0xff, 0x68, 0, 0), RGBA(0xff, 0x68, 0, a), RGBA(0xff, 0x68, 0, a));
	//执行运动
	Entity::Step();
	//执行碰撞
	Entity::Collision();
	if (cbRect.cbBottom)
	{
		/*alpha -= 0.02f;
		if (alpha <= 0)*/
			Destroy();
	}
}
