adding top collision
Some checks failed
Build Project / build (windows-latest) (push) Waiting to run
Build Project / build (ubuntu-latest) (push) Failing after 8m17s

This commit is contained in:
swim67667
2026-06-24 22:40:27 -04:00
parent 257be0b3c5
commit f112c37e9e
6 changed files with 26 additions and 8 deletions

View File

@@ -52,7 +52,8 @@ Entity *SpawnEntity(
float y,
float size,
float mass,
Color color)
Color color,
float drag)
{
for (int i = 0; i < MAX_ENTITIES; i++)
{
@@ -67,6 +68,7 @@ Entity *SpawnEntity(
e->mass = mass;
e->size = size;
e->drag = drag;
e->position = (Vector2){x, y};
e->velocity = (Vector2){0, 0};
@@ -104,7 +106,8 @@ void InitWorld(void)
120,
40,
1.0f,
BLUE);
BLUE,
0.1f);
if (player)
{
@@ -118,7 +121,8 @@ void InitWorld(void)
50,
25,
1.0f,
RED);
RED,
0.9f);
}
simTime = 0.0f;