Skip to content

Commit

Permalink
#1 #2 #3 adding levels photo & logo background
Browse files Browse the repository at this point in the history
  • Loading branch information
myselfhimself committed Feb 15, 2021
1 parent a141d76 commit 8d1b758
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions level.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ BWB_DEBUG = false;
var LEVELS_DATA = [
// Level 1
{
background: 'sprites/level1.png',
background: 'sprites/food/level1/background/caen_background.png',
soundtrack: 'assets/CamilleStSaensLeCygneCarnavalDesAnimauxMono.mp3',
ball_start_x: function(){return width / 2;},
ball_start_y: function(){return height - 350;},
bricks: {
count: 10,
width: 20,
height: 20,
preload: null,
setup: function () {
// override global row x col variables
let COLUMNS = 8;
let ROWS = 1;

var offsetX = width / 2 - (COLUMNS - 1) * (BRICK_MARGIN + BRICK_W) / 2;
var offsetY = 80;
Expand All @@ -38,7 +43,7 @@ var LEVELS_DATA = [
},
// Level 2
{
background: 'sprites/level2.png',
background: 'sprites/food/level2/background/lehavre_background.png',
soundtrack: null,
bricks: {
count: 10,
Expand Down Expand Up @@ -69,7 +74,7 @@ var LEVELS_DATA = [
},
// Level 3
{
background: 'sprites/level3.png',
background: 'sprites/food/level3/background/monde_background.png',
soundtrack: null,
bricks: {
count: 10,
Expand Down Expand Up @@ -116,8 +121,8 @@ var soundtrack;

// Game constants
var BALL_DIAMETER = 30;
var BALL_START_POSITION_X = function () { return width / 2;};
var BALL_START_POSITION_Y = function () { return height - 200;};
var BALL_START_POSITION_X = function () { return LEVELS_DATA[BWB_LEVEL_ID].ball_start_x != undefined ? LEVELS_DATA[BWB_LEVEL_ID].ball_start_x() : width / 2;};
var BALL_START_POSITION_Y = function () { return LEVELS_DATA[BWB_LEVEL_ID].ball_start_y != undefined ? LEVELS_DATA[BWB_LEVEL_ID].ball_start_y() : height - 200;};
var MAX_SPEED = 9;
var BALL_SPEED = 0;
var WALL_THICKNESS = 0;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 8d1b758

Please sign in to comment.