摘要: 直接上代码实现思路:1、首先小数点补 位,9223372036854775808.9+9223372036854775808.9223372036854775808 => 9223372036854775808.900000000000000000+9223372036854775808.92233... 阅读全文
posted @ 2015-03-10 16:26 BoVoM 阅读(869) 评论(0) 推荐(0) 编辑
摘要: /** * #这是一个对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... 阅读全文
posted @ 2014-03-11 11:05 BoVoM 阅读(470) 评论(0) 推荐(0) 编辑
摘要: /***#填充字符串方法* 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 阅读全文
posted @ 2014-03-11 10:10 BoVoM 阅读(269) 评论(0) 推荐(0) 编辑
摘要: /** * #一个 基于 费雪耶茨排列 洗牌方法 * 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... 阅读全文
posted @ 2014-03-11 10:04 BoVoM 阅读(255) 评论(0) 推荐(0) 编辑
摘要: phaser是HTML5开源的游戏引擎。一、源码下载地址:https://github.com/photonstorm/phaser二、文档结构:三、将phaser-master部署到IIS中站点中,如果这是直接浏览站点则会出现报错四、原因是没有配置充当静态文件的扩展名,需要在IIS功能视图中的“MIME类型”中添加".json"扩展名。这时打开站点,就能正确显示网站了。 阅读全文
posted @ 2014-03-10 10:57 BoVoM 阅读(486) 评论(0) 推荐(0) 编辑