#pragma once #include "olcPixelGameEngine.h" struct Emitter{ float frequency; float timer; float lastEmit=0; virtual ~Emitter()=default; Emitter(float frequency,float timer); bool Update(float fElapsedTime); virtual void Emit()=0; }; class LightningBoltEmitter:public Emitter{ vf2d startPos,endPos; bool upperLevel; void DrawLightningBolt(); void Emit()override; public: LightningBoltEmitter(vf2d startPos,vf2d endPos,float frequency,float timer,bool upperLevel); };