diff options
author | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-12-13 12:31:19 -0700 |
---|---|---|
committer | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-12-13 12:31:19 -0700 |
commit | 427449b5d44f3241a7eb71af70bff9110f9ac81c (patch) | |
tree | b06cc80f55562d50b0e05503760b069d776c68a2 /src | |
parent | 4a789495002e520c47654779f899dea630855a36 (diff) |
You are welcome (:
Diffstat (limited to 'src')
-rw-r--r-- | src/levels/level10.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/levels/level10.c b/src/levels/level10.c index 489a7eb..e91d349 100644 --- a/src/levels/level10.c +++ b/src/levels/level10.c @@ -29,15 +29,19 @@ void closelevel10(Levels * levels) { bool updateLevel10(Game * game, Levels * levels) { Level10 * data = (Level10*)levels->data; + Vector3 playerPosition = getEntityFromWorld(game->world, 0)->position; bool levelDone = false; switch (data->stage) { case 0: if (game->world.entitiesCount == 1) { WorldEntry entries[] = { - (WorldEntry){ENTITY_GENERALE, (Vector3){500.0, 500.0, 500.0}, QuaternionIdentity()}, - (WorldEntry){ENTITY_GENERALE, (Vector3){-500.0, -500.0, -500.0}, QuaternionIdentity()}, - (WorldEntry){ENTITY_GENERALE, (Vector3){500.0, 0.0, 0.0}, QuaternionIdentity()} + (WorldEntry){ENTITY_GENERALE, + Vector3Add(playerPosition, (Vector3){500.0, 500.0, 500.0}), QuaternionIdentity()}, + (WorldEntry){ENTITY_GENERALE, + Vector3Add(playerPosition, (Vector3){-500.0, -500.0, -500.0}), QuaternionIdentity()}, + (WorldEntry){ENTITY_GENERALE, + Vector3Add(playerPosition, (Vector3){500.0, 0.0, 0.0}), QuaternionIdentity()} }; addEntriesToWorld( @@ -53,6 +57,14 @@ bool updateLevel10(Game * game, Levels * levels) { break; case 1: if (game->world.entitiesCount == 1) { + addEntityGroupToWorld( + game, + ENTITY_GENERALE, + 15, + Vector3Add(playerPosition, (Vector3){0.0, 0.0, 900.0}), + (Vector3){50.0, 50.0, 50.0} + ); + data->stage = 2; } |