diff --git a/examples/assets/games/breakout/ball.png b/examples/assets/games/breakout/ball.png new file mode 100644 index 00000000..aa46e78b Binary files /dev/null and b/examples/assets/games/breakout/ball.png differ diff --git a/examples/assets/games/breakout/brick0.png b/examples/assets/games/breakout/brick0.png new file mode 100644 index 00000000..53949a4a Binary files /dev/null and b/examples/assets/games/breakout/brick0.png differ diff --git a/examples/assets/games/breakout/brick1.png b/examples/assets/games/breakout/brick1.png new file mode 100644 index 00000000..33adc12c Binary files /dev/null and b/examples/assets/games/breakout/brick1.png differ diff --git a/examples/assets/games/breakout/brick2.png b/examples/assets/games/breakout/brick2.png new file mode 100644 index 00000000..3f03babd Binary files /dev/null and b/examples/assets/games/breakout/brick2.png differ diff --git a/examples/assets/games/breakout/brick3.png b/examples/assets/games/breakout/brick3.png new file mode 100644 index 00000000..15a66c76 Binary files /dev/null and b/examples/assets/games/breakout/brick3.png differ diff --git a/examples/assets/games/breakout/brick4.png b/examples/assets/games/breakout/brick4.png new file mode 100644 index 00000000..5f50f1c4 Binary files /dev/null and b/examples/assets/games/breakout/brick4.png differ diff --git a/examples/assets/games/breakout/brick5.png b/examples/assets/games/breakout/brick5.png new file mode 100644 index 00000000..771193f4 Binary files /dev/null and b/examples/assets/games/breakout/brick5.png differ diff --git a/examples/assets/games/breakout/paddle.png b/examples/assets/games/breakout/paddle.png new file mode 100644 index 00000000..b99502e2 Binary files /dev/null and b/examples/assets/games/breakout/paddle.png differ diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 41be1595..66dafd98 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -755,8 +755,8 @@ Phaser.InputHandler.prototype = { */ setDragLock: function (allowHorizontal, allowVertical) { - allowHorizontal = allowHorizontal || true; - allowVertical = allowVertical || true; + if (typeof allowHorizontal == 'undefined') { allowHorizontal = true; } + if (typeof allowVertical == 'undefined') { allowVertical = true; } this.allowHorizontalDrag = allowHorizontal; this.allowVerticalDrag = allowVertical; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index d45543f7..a7bf61e0 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -27,7 +27,7 @@ Phaser.Sound = function (game, key, volume, loop) { * @public * @type {string} */ - this.name = ''; + this.name = key; /** * Asset key for the sound. @@ -266,9 +266,7 @@ Phaser.Sound.prototype = { if (typeof loop == 'undefined') { loop = false; } if (typeof forceRestart == 'undefined') { forceRestart = false; } - - - console.log('play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); + console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); if (this.isPlaying == true && forceRestart == false && this.override == false) {