#pragma once #include "olcPixelGameEngine.h" #include "Animation.h" #include "olcUTIL_Animate2D.h" struct Effect{ vf2d pos; float lifetime; float fadeout; float size; Effect(vf2d pos,float lifetime,AnimationState animation,float size=1.0f,float fadeout=0.0f); bool Update(float fElapsedTime); Animate2D::Frame GetFrame(); void Draw(); private: Animate2D::Animationanimation; Animate2D::AnimationState internal_animState; float original_fadeoutTime; };