Fixed Group.removeBetween's default endIndex bug

This commit is contained in:
darfux 2014-08-26 20:54:16 +08:00
parent 6fd51e29b2
commit abdf54858c

View file

@ -1632,7 +1632,7 @@ Phaser.Group.prototype.removeAll = function (destroy, silent) {
*/
Phaser.Group.prototype.removeBetween = function (startIndex, endIndex, destroy, silent) {
if (typeof endIndex === 'undefined') { endIndex = this.children.length; }
if (typeof endIndex === 'undefined') { endIndex = this.children.length - 1; }
if (typeof destroy === 'undefined') { destroy = false; }
if (typeof silent === 'undefined') { silent = false; }