mirror of
https://github.com/wassname/phaser.git
synced 2026-07-27 11:25:30 +08:00
Updated documentation.
This commit is contained in:
+64
-19
@@ -54,6 +54,10 @@
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
@@ -138,6 +142,10 @@
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
@@ -302,6 +310,26 @@
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
@@ -310,6 +338,10 @@
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
@@ -356,6 +388,14 @@
|
||||
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#render">render</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#renderXY">renderXY</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#right">right</a>
|
||||
</li>
|
||||
@@ -394,10 +434,10 @@
|
||||
* @constructor
|
||||
* @param {number} x - The x coordinate of the top-left corner of the Rectangle.
|
||||
* @param {number} y - The y coordinate of the top-left corner of the Rectangle.
|
||||
* @param {number} width - The width of the Rectangle in pixels.
|
||||
* @param {number} height - The height of the Rectangle in pixels.
|
||||
* @param {number} width - The width of the Rectangle.
|
||||
* @param {number} height - The height of the Rectangle.
|
||||
* @return {Rectangle} This Rectangle object.
|
||||
**/
|
||||
*/
|
||||
Phaser.Rectangle = function (x, y, width, height) {
|
||||
|
||||
x = x || 0;
|
||||
@@ -406,22 +446,22 @@ Phaser.Rectangle = function (x, y, width, height) {
|
||||
height = height || 0;
|
||||
|
||||
/**
|
||||
* @property {number} x - Description.
|
||||
* @property {number} x - The x coordinate of the top-left corner of the Rectangle.
|
||||
*/
|
||||
this.x = x;
|
||||
|
||||
/**
|
||||
* @property {number} y - Description.
|
||||
* @property {number} y - The y coordinate of the top-left corner of the Rectangle.
|
||||
*/
|
||||
this.y = y;
|
||||
|
||||
/**
|
||||
* @property {number} width - Description.
|
||||
* @property {number} width - The width of the Rectangle.
|
||||
*/
|
||||
this.width = width;
|
||||
|
||||
/**
|
||||
* @property {number} height - Description.
|
||||
* @property {number} height - The height of the Rectangle.
|
||||
*/
|
||||
this.height = height;
|
||||
|
||||
@@ -435,7 +475,7 @@ Phaser.Rectangle.prototype = {
|
||||
* @param {number} dx - Moves the x value of the Rectangle object by this amount.
|
||||
* @param {number} dy - Moves the y value of the Rectangle object by this amount.
|
||||
* @return {Rectangle} This Rectangle object.
|
||||
**/
|
||||
*/
|
||||
offset: function (dx, dy) {
|
||||
|
||||
this.x += dx;
|
||||
@@ -450,7 +490,7 @@ Phaser.Rectangle.prototype = {
|
||||
* @method Phaser.Rectangle#offsetPoint
|
||||
* @param {Point} point - A Point object to use to offset this Rectangle object.
|
||||
* @return {Rectangle} This Rectangle object.
|
||||
**/
|
||||
*/
|
||||
offsetPoint: function (point) {
|
||||
return this.offset(point.x, point.y);
|
||||
},
|
||||
@@ -463,7 +503,7 @@ Phaser.Rectangle.prototype = {
|
||||
* @param {number} width - The width of the Rectangle in pixels.
|
||||
* @param {number} height - The height of the Rectangle in pixels.
|
||||
* @return {Rectangle} This Rectangle object
|
||||
**/
|
||||
*/
|
||||
setTo: function (x, y, width, height) {
|
||||
|
||||
this.x = x;
|
||||
@@ -478,7 +518,7 @@ Phaser.Rectangle.prototype = {
|
||||
/**
|
||||
* Runs Math.floor() on both the x and y values of this Rectangle.
|
||||
* @method Phaser.Rectangle#floor
|
||||
**/
|
||||
*/
|
||||
floor: function () {
|
||||
|
||||
this.x = Math.floor(this.x);
|
||||
@@ -489,7 +529,7 @@ Phaser.Rectangle.prototype = {
|
||||
/**
|
||||
* Runs Math.floor() on the x, y, width and height values of this Rectangle.
|
||||
* @method Phaser.Rectangle#floorAll
|
||||
**/
|
||||
*/
|
||||
floorAll: function () {
|
||||
|
||||
this.x = Math.floor(this.x);
|
||||
@@ -504,7 +544,7 @@ Phaser.Rectangle.prototype = {
|
||||
* @method Phaser.Rectangle#copyFrom
|
||||
* @param {any} source - The object to copy from.
|
||||
* @return {Rectangle} This Rectangle object.
|
||||
**/
|
||||
*/
|
||||
copyFrom: function (source) {
|
||||
return this.setTo(source.x, source.y, source.width, source.height);
|
||||
},
|
||||
@@ -514,7 +554,7 @@ Phaser.Rectangle.prototype = {
|
||||
* @method Phaser.Rectangle#copyTo
|
||||
* @param {any} source - The object to copy to.
|
||||
* @return {object} This object.
|
||||
**/
|
||||
*/
|
||||
copyTo: function (dest) {
|
||||
|
||||
dest.x = this.x;
|
||||
@@ -598,7 +638,7 @@ Phaser.Rectangle.prototype = {
|
||||
* @return {Phaser.Rectangle} A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0.
|
||||
*/
|
||||
intersection: function (b, out) {
|
||||
return Phaser.Rectangle.intersection(this, b, output);
|
||||
return Phaser.Rectangle.intersection(this, b, out);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -642,7 +682,7 @@ Phaser.Rectangle.prototype = {
|
||||
* Returns a string representation of this object.
|
||||
* @method Phaser.Rectangle#toString
|
||||
* @return {string} A string representation of the instance.
|
||||
**/
|
||||
*/
|
||||
toString: function () {
|
||||
return "[{Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + " empty=" + this.empty + ")}]";
|
||||
}
|
||||
@@ -873,7 +913,12 @@ Object.defineProperty(Phaser.Rectangle.prototype, "empty", {
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
this.setTo(0, 0, 0, 0);
|
||||
|
||||
if (value === true)
|
||||
{
|
||||
this.setTo(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
@@ -998,7 +1043,7 @@ Phaser.Rectangle.equals = function (a, b) {
|
||||
*/
|
||||
Phaser.Rectangle.intersection = function (a, b, out) {
|
||||
|
||||
out = out || new Phaser.Rectangle;
|
||||
out = out || new Phaser.Rectangle();
|
||||
|
||||
if (Phaser.Rectangle.intersects(a, b))
|
||||
{
|
||||
@@ -1085,7 +1130,7 @@ Phaser.Rectangle.union = function (a, b, out) {
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Thu Nov 07 2013 06:07:33 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user