摘要:
/** * #这是一个对jQuery.isPlainObject(obj)稍加修改的方法。 一个 普通对象 obj.toString() => "[object Object]" * This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object]. * @method Phaser.Utils.isPlainObje... 阅读全文
摘要:
/***#填充字符串方法* Javascript string pad http://www.webtoolkit.info/.* pad = the string to pad it out with (defaults to a space) * dir = 1 (left), 2 (right), 3 (both)* @method Phaser.Utils.pad * @param {string} str - The target string. ——#需要填充的字符 * @param {number} len - The number of characters to be add 阅读全文
摘要:
/** * #一个 基于 费雪耶茨排列 洗牌方法 * A standard Fisher-Yates Array shuffle implementation. * @method Phaser.Utils.shuffle * @param {array} array - The array to shuffle. ——#参数:带洗牌数组 * @return {array} The shuffled array. ——#返回:洗好牌的数组 */ shuffle: function (array) { for (var i = arr... 阅读全文