1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include "game.h"
#include "world.h"
#include "entity.h"
#include "entityGrouping.h"
void initLevel4(Game * game, Levels * levels) {
int i;
// Add player.
addEntryToWorld(&game->world, game, (WorldEntry){ENTITY_ANTIFA, (Vector3){0.0, 0.0, 0.0}, QuaternionIdentity()});
Vector3 positions[] = {
(Vector3){800.0, 0.0, 0.0},
(Vector3){-800.0, 0.0, 0.0},
(Vector3){0.0, 800.0, 0.0},
(Vector3){0.0, -800.0, 0.0},
(Vector3){0.0, 0.0, 800.0},
(Vector3){0.0, 0.0, -800.0}
};
Vector3 spacing = (Vector3){0.0, 15.0, 15.0};
// Add groups.
for (i = 0; i < sizeof(positions) / sizeof(Vector3); ++i) {
addSoldatoGroupWithLeader(game, ENTITY_CAPORALE, 3, positions[i], spacing);
spacing = Vector3Negate(spacing); // Swap group direction each time.
}
}
void closelevel4(Levels * levels) {
}
bool updateLevel4(Game * game, Levels * levels) {
return game->world.entitiesCount == 1;
}
|