Collider debug boxes with SDL_Rect

This commit is contained in:
2021-11-03 17:37:56 -04:00
parent 165052a617
commit bd0c49b3ae
10 changed files with 162 additions and 24 deletions

View File

@ -18,6 +18,7 @@ public:
Vector2D position;
Vector2D velocity;
Vector2D lastSafePos;
int height = 40;
int width = 30;
@ -37,10 +38,10 @@ public:
speed = speed*sc;
}
TransformComponent(float x, float y)
{
position.Zero();
}
// TransformComponent(float x, float y)
// {
// position.Zero();
// }
TransformComponent(int x, int y, int w, int h, int sc)
{
@ -55,6 +56,7 @@ public:
void init() override
{
velocity.Zero();
lastSafePos.Zero();
}
void update() override
{