#define OLC_PGE_APPLICATION #include "olcPixelGameEngine.h" #define OLC_SOUNDWAVE #include "olcSoundWaveEngine.h" #include "VirusAttack.h" VirusAttack::VirusAttack() { // Name your application sAppName = "olcCodeJam 2023 Entry"; } bool VirusAttack::OnUserCreate(){ // Called once at the start, so create things here VIRUS_IMG1.Load("assets/unit.png"); units.push_back(std::make_unique(vf2d{32,32},VIRUS_IMG1,true)); return true; } bool VirusAttack::OnUserUpdate(float fElapsedTime){ // Called once per frame, draws random coloured pixels for(std::unique_ptr&u:units){ u->Update(fElapsedTime); } for(std::unique_ptr&u:units){ u->Draw(this); } return true; } int main() { VirusAttack app; if (app.Construct(240, 160, 4, 4)) app.Start(); return 0; }