#pragma once #include "GameObject.h" #include "Graphics.h" #include "GraphicsComponent.h" #include #include #include class PlayerGraphics : public GraphicsComponent { public: void setPos(int x, int y) { hitbox.x = x; hitbox.y = y; } void update(GameObject const& object, Graphics &graphics) { SDL_Color color = { .r = 0, .g = 255, .b = 0, .a = 255}; graphics.drawRect(hitbox, color); } private: SDL_FRect hitbox = { .x = 40, .y = 40, .w = 300, .h = 300, }; };