From 45426be0bc2458b9aaff3b896c78e2066ed37a52 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 20 Sep 2013 23:21:12 +0100 Subject: [PATCH] Assets update --- examples/assets/games/breakout/ball.png | Bin 0 -> 190 bytes examples/assets/games/breakout/brick0.png | Bin 0 -> 160 bytes examples/assets/games/breakout/brick1.png | Bin 0 -> 160 bytes examples/assets/games/breakout/brick2.png | Bin 0 -> 171 bytes examples/assets/games/breakout/brick3.png | Bin 0 -> 162 bytes examples/assets/games/breakout/brick4.png | Bin 0 -> 162 bytes examples/assets/games/breakout/brick5.png | Bin 0 -> 167 bytes examples/assets/games/breakout/paddle.png | Bin 0 -> 446 bytes src/input/InputHandler.js | 4 ++-- src/sound/Sound.js | 6 ++---- 10 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 examples/assets/games/breakout/ball.png create mode 100644 examples/assets/games/breakout/brick0.png create mode 100644 examples/assets/games/breakout/brick1.png create mode 100644 examples/assets/games/breakout/brick2.png create mode 100644 examples/assets/games/breakout/brick3.png create mode 100644 examples/assets/games/breakout/brick4.png create mode 100644 examples/assets/games/breakout/brick5.png create mode 100644 examples/assets/games/breakout/paddle.png diff --git a/examples/assets/games/breakout/ball.png b/examples/assets/games/breakout/ball.png new file mode 100644 index 0000000000000000000000000000000000000000..aa46e78b791c831276f40015ee9a412a4b97f1d8 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWw1G37#&FAr-fh{`{ZM$Ri;sxj^R)!-_t^HGLtxItHzgl~WTq zcYiPtX>AW%*Ccg=FYNdc2PK9`=4(42y{O#auwyD?SJTwvdJQi*vYpvB8U}fi7AzZCsS>Jikv)M978H@B_&9_Y7lh#`~Uy^uC{ahuh=JfzV2>N5nfw+ zpebkhwnC$;x(jylyXi`7ZOHn`z_f1OT8U}fi7AzZCsS>Jikv)M978H@B_&9_Y7lh#`~Uy^t~R?lC)iX(x$2lb)uMhk zu-^2me9W;b+M!s!C(0m;@#-f=6Z1K-hF@w7zA!p8FfxcN8U}fi7AzZCsS>JihMm?978H@B_&9_Y7lh#`~SbZN8Np+ZmqVu`BuUnT<2bbio;N$EbIkSEzTxkmAUNMb-!On+&&Mkc2ypW%PiHAY3o3HkO S)%Gr+!3>_RelF{r5}E)ofI43Q literal 0 HcmV?d00001 diff --git a/examples/assets/games/breakout/brick3.png b/examples/assets/games/breakout/brick3.png new file mode 100644 index 0000000000000000000000000000000000000000..15a66c7684cb9616d460a9a07a1b15e1300e4fa9 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Et!2~3KB)#GTQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jid;Nh978H@B_&9_Y7lh#`~Uy^t~R|{7kN}38^3N)5nfw+ zpeg5hWxLBNiL8zz%Xad+=}K&E$ok1JtB(JSe3hNVF9wAJ3?*FLTpfEd=K#%P@O1Ta JS?83{1OSDmHxU2; literal 0 HcmV?d00001 diff --git a/examples/assets/games/breakout/brick4.png b/examples/assets/games/breakout/brick4.png new file mode 100644 index 0000000000000000000000000000000000000000..5f50f1c43b99e9c5094544698a162848791fc2f3 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Et!2~3KB)#GTQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jid;Nh978H@B_&9_Y7lh#`~Uy^t~S3}OPN(ZUtZ7TsTTFS zf%T@J;otZWqiMY77VYGB)0NoTkoA*+DK0iey2?)C7lXn9hWLkERpHe)Qi0|%c)I$z JtaD0e0sv6(Hc8U}fi7AzZCsS>Jiab4C978H@B_&9_Y7lh#`~SbZ$Fs`SK}Roa)^}VcYh5kw zVRZ2pyNQ4`xijX|FY$v~)uEf@cte*_VfB7Wkd1@I15*S`h;I-#|=aCOI Ol)=;0&t;ucLK6U5em7eH literal 0 HcmV?d00001 diff --git a/examples/assets/games/breakout/paddle.png b/examples/assets/games/breakout/paddle.png new file mode 100644 index 0000000000000000000000000000000000000000..b99502e2f39b4a623e6a4051d78addd36f35c641 GIT binary patch literal 446 zcmV;v0YUzWP)X<1pe*bFsE(0g z5CdY}&%`jo01GT+a=lc*0uBH8z_gH|J0#@V+ldOn!2TzdUbMtOos6f#jtNMJUUm-0N?}M*~l!vz3i=o6U oETzEO6C*E%M|(@d8~_9u0P?1K&R1s-ga7~l07*qoM6N<$g7RR%FaQ7m literal 0 HcmV?d00001 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) {