#include "Effect.h"
#include "DEFINES.h"
#include "safemap.h"

INCLUDE_GFX

class FallingDebris:public Effect{
	const float GRAVITY=20;
public:
	inline FallingDebris(vf2d pos, float lifetime, std::string imgFile, bool upperLevel,vf2d size={1,1},float fadeout=0.0f,vf2d spd={},Pixel col=WHITE,float rotation=0,float rotationSpd=0,bool additiveBlending=false)
		:Effect(pos,lifetime,imgFile,upperLevel,size,fadeout,spd,col,rotation,rotationSpd,additiveBlending){

	}

	inline bool Update(float fElapsedTime)override{
		spd.y+=GRAVITY*fElapsedTime;
		return Effect::Update(fElapsedTime);
	}
};