diff options
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -58,12 +58,15 @@ game_restart_scene(Game *this) for (int x = 0; x < map_width(); x++) { const int dx = x * TSIZE + TSIZE / 2; const int dy = y * TSIZE + TSIZE / 2; + Entity *e; switch (map_get(x, y)) { case 2: player_init(game_create_entity(this), dx, dy); break; + case 3: case 4: - exit_init(game_create_entity(this), dx, dy); + e = exit_init(game_create_entity(this), dx, dy); + e->exit.dir = (map_get(x, y) == 3) ? -1 : 1; break; case 5: spike_init(game_create_entity(this), dx, dy); |