mirror of
https://github.com/wassname/phaser.git
synced 2026-07-03 17:10:40 +08:00
Added Math.numberArray
This commit is contained in:
@@ -35,9 +35,10 @@ Phaser is everything we ever wanted from an HTML5 game framework. It will power
|
||||
Change Log
|
||||
----------
|
||||
|
||||
Version 1.0.5 (September 19th 2013)
|
||||
Version 1.0.5 (In progress)
|
||||
|
||||
* Fixed issue in FrameData.getFrameIndexes where the input array was being ignored.
|
||||
* Added Math.numberArray - Returns an Array containing the numbers from min to max (inclusive), useful for animation frame construction.
|
||||
|
||||
|
||||
Version 1.0.4 (September 18th 2013)
|
||||
|
||||
@@ -323,6 +323,26 @@ Phaser.Math = {
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an Array containing the numbers from min to max (inclusive)
|
||||
*
|
||||
* @param min The minimum value the array starts with
|
||||
* @param max The maximum value the array contains
|
||||
* @return The array of number values
|
||||
*/
|
||||
numberArray: function (min, max) {
|
||||
|
||||
var result = [];
|
||||
|
||||
for (var i = min; i <= max; i++)
|
||||
{
|
||||
result.push(i);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user