adding top collision
This commit is contained in:
10
src/world.c
10
src/world.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user