#pragma once #include "olcPixelGameEngine.h" #include "Constant.h" #include "olcPGEX_TransformedView.h" class DeathAnimation{ vf2d pos; Renderable img; Renderable&originalImg; Renderable&matrixImg; vf2d randomOffset; float fadeTimer=CONSTANT::DEATH_FADE_TIME; bool friendly; public: DeathAnimation(PixelGameEngine*pge,vf2d pos,Renderable&unitImg,Renderable&matrixImg,bool friendly); void Update(float fElapsedTime); void Draw(TileTransformedView&game,PixelGameEngine*pge); bool IsDone(); };