#include "olcPixelGameEngine.h" #include "olcSoundWaveEngine.h" #include "olcPGEX_TransformedView.h" #include "Unit.h" #include "Constant.h" class VirusAttack : public olc::PixelGameEngine { private: std::vector>units; Renderable TILE; vf2d camera={213,160}; TileTransformedView game; vf2d startingDragPos=CONSTANT::UNSELECTED; void HandleDraggingSelection(); void DrawSelectionRectangle(); void HandleRightClickMove(); void CollisionChecking(std::shared_ptru,std::shared_ptru2); void IdentifyClosestTarget(Unit*&closestUnit,float&closestDist,std::shared_ptru,std::shared_ptru2); vf2d GetWorldMousePos(); public: VirusAttack(); public: bool OnUserCreate() override; bool OnUserUpdate(float fElapsedTime) override; };