071 : Second platform
Balthazar:
Adding a second platform
Balthazar:
To add a new platform, all we need to do is create a new one and add it to the platforms array.
function init_game() {
...
// Game state.
_game.game_over = false;
_game.platforms = [];
_game.platforms.push(create_platform(0, 360, _game.width, 40));
_game.platforms.push(create_platform(200, 290, 80, 20));
_game.goal = create_goal(500, 360);
...
}
GOTO 078