#include "DebuffIcon.h"

void DebuffIcon::Update(float fElapsedTime){
	pos.y-=6*fElapsedTime;
	lifetime-=fElapsedTime;
}

void DebuffIcon::Draw(TileTransformedView&game){
	game.DrawRotatedDecal(pos,icon->Decal(),0,icon->Sprite()->Size()/2,{1,1},{255,255,255,uint8_t((lifetime/CONSTANT::DEBUFFICON_LIFETIME)*255)});
	game.DrawRotatedDecal(pos+vf2d{4,-4},redXIcon->Decal(),0,icon->Sprite()->Size()/2,{1,1},{255,255,255,uint8_t((lifetime/CONSTANT::DEBUFFICON_LIFETIME)*255)});
}