#pragma once
#include "Entity.h"
#define PEPIXELCRACK_CREATENAME L"pe_pixelcrack"
//颗粒实体：像素裂片
class PePixelCrack :
	public ActionEntity
{
public:
	PePixelCrack();
	void Step() override;
	void DeltaTime(float deltaTime) override;//绘制更新
	void SetColor(UINT8 r, UINT8 g, UINT8 b);
	float gravity;
	UINT8 r, g, b;//颜色
	std::vector<PenVertex> fillList_set;
	std::vector<PenVertex> fillList_set_last;
};

std::shared_ptr<Entity> CreatePePixelCrack();

void SetPePixelCrack(std::shared_ptr<Entity> parent, float x, float y, int nMin, int nMax, UINT8 r = 0xff, UINT8 g = 0xff, UINT8 b = 0xff);
