Tilemap painting example and other smaller updates.

This commit is contained in:
photonstorm
2013-10-17 21:10:00 +01:00
parent 275fa4641e
commit 7e8b79adf4
7 changed files with 256 additions and 26 deletions
+14
View File
@@ -10,6 +10,20 @@
*/
Phaser.Utils = {
shuffle: function (array) {
for (var i = array.length - 1; i > 0; i--)
{
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
},
/**
* Javascript string pad http://www.webtoolkit.info/.
* pad = the string to pad it out with (defaults to a space)<br>