- out |
+ output |
@@ -4617,7 +4907,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -4770,7 +5060,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -4930,7 +5220,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -5072,7 +5362,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
Source:
@@ -5123,7 +5413,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
- copyFrom(source) → {Rectangle}
+
@@ -5213,7 +5503,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
Source:
@@ -5249,7 +5539,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
-Rectangle
+Phaser.Rectangle
@@ -5354,7 +5644,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
Source:
@@ -5496,7 +5786,7 @@ This method compares the x, y, width and height properties of each Rectangle.Source:
@@ -5588,7 +5878,7 @@ This method compares the x, y, width and height properties of each Rectangle.Source:
@@ -5657,7 +5947,7 @@ This method compares the x, y, width and height properties of each Rectangle.Source:
@@ -5798,7 +6088,7 @@ This method compares the x, y, width and height properties of each Rectangle.Source:
@@ -5962,7 +6252,7 @@ This method compares the x, y, width and height properties of each Rectangle.Source:
@@ -6127,7 +6417,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -6360,7 +6650,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -6411,7 +6701,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
- offset(dx, dy) → {Rectangle}
+
@@ -6560,7 +6850,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
-Rectangle
+Phaser.Rectangle
@@ -6575,7 +6865,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
- offsetPoint(point) → {Rectangle}
+
@@ -6623,7 +6913,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
|
-Point
+Phaser.Point
@@ -6701,7 +6991,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
-Rectangle
+Phaser.Rectangle
@@ -6716,7 +7006,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
- setTo(x, y, width, height) → {Rectangle}
+
@@ -6875,7 +7165,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -6911,7 +7201,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
-Rectangle
+Phaser.Rectangle
@@ -7028,7 +7318,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -7120,7 +7410,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -7304,7 +7594,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Source:
@@ -7378,7 +7668,7 @@ This method checks the x, y, width, and height properties of the Rectangles.
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:33 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.RenderTexture.html b/docs/Phaser.RenderTexture.html
index d3854fb4..631e8769 100644
--- a/docs/Phaser.RenderTexture.html
+++ b/docs/Phaser.RenderTexture.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -591,7 +625,7 @@
Source:
@@ -719,7 +753,109 @@
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ game
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently running game. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -923,7 +1059,7 @@
- Source:
@@ -1025,7 +1161,109 @@
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The key of the RenderTexture in the Cache, if stored there. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1127,7 +1365,7 @@
- Source:
@@ -1229,7 +1467,109 @@
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ type
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ type |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Base Phaser object type. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1331,7 +1671,7 @@
- Source:
@@ -1577,7 +1917,7 @@ draw all children as well.
- Source:
@@ -1860,7 +2200,7 @@ If the display object is a Group or has children it will draw all children as we
- Source:
@@ -1929,7 +2269,1930 @@ If the display object is a Group or has children it will draw all children as we
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: RenderTexture
+
+
+
+
+ Phaser.
+
+ RenderTexture
+
+
+
+
+
+
+
+
+
+
+
+
+
+ new RenderTexture(game, key, width, height)
+
+
+
+
+
+
+
+ A RenderTexture is a special texture that allows any displayObject to be rendered to it.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ Current game instance. |
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ Internal Phaser reference key for the render texture. |
+
+
+
+
+
+
+ width |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 100
+
+ |
+
+
+ The width of the render texture. |
+
+
+
+
+
+
+ height |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 100
+
+ |
+
+
+ The height of the render texture. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+-
+
frame
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+PIXI.Rectangle
+
+
+
+ |
+
+
+
+
+
+ The frame for this texture. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
game
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently running game. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
game
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently running game. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
height
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ height |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ the height. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
indetityMatrix
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ indetityMatrix |
+
+
+
+
+
+PIXI.mat3
+
+
+
+ |
+
+
+
+
+
+ Matrix object. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
key
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The key of the RenderTexture in the Cache, if stored there. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
name
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ the name of the object. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
type
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ type |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Base Phaser object type. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
type
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ type |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Base Phaser object type. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
width
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ width |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ the width. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+-
+
render(displayObject, position, clear, renderHidden)
+
+
+
+-
+
+
+
+ This function will draw the display object to the texture. If the display object is a Group or has children it will
+draw all children as well.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ displayObject |
+
+
+
+
+
+DisplayObject
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The display object to render this texture on. |
+
+
+
+
+
+
+ position |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ Where to draw the display object. |
+
+
+
+
+
+
+ clear |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If true the texture will be cleared before the displayObject is drawn. |
+
+
+
+
+
+
+ renderHidden |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If true displayObjects that have their visible property set to false will still be rendered. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
renderXY(displayObject, x, y, clear, renderHidden)
+
+
+
+-
+
+
+
+ This function will draw the display object to the texture at the given x/y coordinates.
+If the display object is a Group or has children it will draw all children as well.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ displayObject |
+
+
+
+
+
+DisplayObject
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The display object to render this texture on. |
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The x coordinate to draw the display object at. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The y coordinate to draw the display object at. |
+
+
+
+
+
+
+ clear |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If true the texture will be cleared before the displayObject is drawn. |
+
+
+
+
+
+
+ renderHidden |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If true displayObjects that have their visible property set to false will still be rendered. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
resize()
+
+
+
+-
+
+
+
+ Resizes the RenderTexture.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1980,7 +4243,7 @@ If the display object is a Group or has children it will draw all children as we
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:33 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.RequestAnimationFrame.html b/docs/Phaser.RequestAnimationFrame.html
index 724525ad..91a68ab3 100644
--- a/docs/Phaser.RequestAnimationFrame.html
+++ b/docs/Phaser.RequestAnimationFrame.html
@@ -182,6 +182,10 @@
Group
+ -
+ Image
+
+
-
Input
@@ -398,6 +402,36 @@
+ -
+ Global
+
+
+
+
@@ -1303,7 +1337,7 @@
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:33 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Signal.html b/docs/Phaser.Signal.html
index 176d68b9..28377b51 100644
--- a/docs/Phaser.Signal.html
+++ b/docs/Phaser.Signal.html
@@ -182,6 +182,10 @@
Group
+ -
+ Image
+
+
-
Input
@@ -398,6 +402,36 @@
+ -
+ Global
+
+
+
+
@@ -2288,7 +2322,7 @@ IMPORTANT: should be called only during signal dispatch, calling it before/after
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:33 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.SinglePad.html b/docs/Phaser.SinglePad.html
index 5452d373..f1abb223 100644
--- a/docs/Phaser.SinglePad.html
+++ b/docs/Phaser.SinglePad.html
@@ -182,6 +182,10 @@
Group
+ -
+ Image
+
+
-
Input
@@ -398,6 +402,36 @@
+ -
+ Global
+
+
+
+
@@ -3775,7 +3809,7 @@ analog trigger buttons on the XBOX 360 controller
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:33 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Sound.html b/docs/Phaser.Sound.html
index c8bf2e3f..f44b1490 100644
--- a/docs/Phaser.Sound.html
+++ b/docs/Phaser.Sound.html
@@ -182,6 +182,10 @@
Group
+ -
+ Image
+
+
-
Input
@@ -398,6 +402,36 @@
+ -
+ Global
+
+
+
+
@@ -5799,7 +5833,7 @@ This allows you to bundle multiple sounds together into a single audio file and
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:34 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.SoundManager.html b/docs/Phaser.SoundManager.html
index 4c50e2f2..1c61d2bf 100644
--- a/docs/Phaser.SoundManager.html
+++ b/docs/Phaser.SoundManager.html
@@ -182,6 +182,10 @@
Group
+ -
+ Image
+
+
-
Input
@@ -398,6 +402,36 @@
+ -
+ Global
+
+
+
+
@@ -2857,7 +2891,7 @@ Note: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:conf
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:34 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Sprite.html b/docs/Phaser.Sprite.html
index 8338ac67..740daa40 100644
--- a/docs/Phaser.Sprite.html
+++ b/docs/Phaser.Sprite.html
@@ -182,6 +182,10 @@
Group
+ -
+ Image
+
+
-
Input
@@ -398,6 +402,36 @@
+ -
+ Global
+
+
+
+
@@ -623,6 +657,11404 @@ events (via Sprite.events), animation (via Sprite.animations), camera culling an
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+-
+
alive
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ alive |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
angle
+
+
+
+-
+
+
+ Indicates the rotation of the Sprite, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
+Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
+If you wish to work in radians instead of degrees use the property Sprite.rotation instead.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ angle |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Gets or sets the Sprites angle of rotation in degrees. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
angle
+
+
+
+-
+
+
+ Indicates the rotation of the Sprite, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
+Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
+If you wish to work in radians instead of degrees use the property Sprite.rotation instead. Working in radians is also a little faster as it doesn't have to convert the angle.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ angle |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The angle of this Image in degrees. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
animations
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ animations |
+
+
+
+
+
+Phaser.AnimationManager
+
+
+
+ |
+
+
+
+
+
+ This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager) |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
animations
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ animations |
+
+
+
+
+
+Phaser.AnimationManager
+
+
+
+ |
+
+
+
+
+
+ This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager) |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
autoCull
+
+
+
+-
+
+
+ Should this Sprite be automatically culled if out of range of the camera?
+A culled sprite has its renderable property set to 'false'.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ autoCull |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ A flag indicating if the Sprite should be automatically camera culled or not. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
autoCull
+
+
+
+-
+
+
+ Should this Sprite be automatically culled if out of range of the camera?
+A culled sprite has its renderable property set to 'false'.
+Be advised this is quite an expensive operation, as it has to calculate the bounds of the object every frame, so only enable it if you really need it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ autoCull |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ A flag indicating if the Sprite should be automatically camera culled or not. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
body
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ body |
+
+
+
+
+
+Phaser.Physics.Arcade.Body
+
+
+
+ |
+
+
+
+
+
+ By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
body
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ body |
+
+
+
+
+
+Phaser.Physics.Arcade.Body
+
+
+
+ |
+
+
+
+
+
+ By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
bottomLeft
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ bottomLeft |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ A Point containing the bottom left coordinate of the Sprite. Takes rotation and scale into account. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
bottomRight
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ bottomRight |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ A Point containing the bottom right coordinate of the Sprite. Takes rotation and scale into account. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
bounds
+
+
+
+-
+
+
+ This Rectangle object fully encompasses the Sprite and is updated in real-time.
+The bounds is the full bounding area after rotation and scale have been taken into account. It should not be modified directly.
+It's used for Camera culling and physics body alignment.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ bounds |
+
+
+
+
+
+Phaser.Rectangle
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
cameraOffset
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ cameraOffset |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ If this Sprite is fixed to the camera then use this Point to specify how far away from the Camera x/y it's rendered. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
center
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ center |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ A Point containing the center coordinate of the Sprite. Takes rotation and scale into account. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
crop
+
+
+
+-
+
+
+ You can crop the Sprites texture by modifying the crop properties. For example crop.width = 50 would set the Sprite to only render 50px wide.
+The crop is only applied if you have set Sprite.cropEnabled to true.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ crop |
+
+
+
+
+
+Phaser.Rectangle
+
+
+
+ |
+
+
+
+
+
+ The crop Rectangle applied to the Sprite texture before rendering. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
cropEnabled
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ cropEnabled |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If true the Sprite.crop property is used to crop the texture before render. Set to false to disable. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
currentFrame
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ currentFrame |
+
+
+
+
+
+Phaser.Frame
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently displayed frame. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
debug
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ debug |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Handy flag to use with Game.enableStep |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
debug
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ debug |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Handy flag to use with Game.enableStep |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> deltaX
+
+
+
+-
+
+
+ Returns the delta x value. The difference between world.x now and in the previous step.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ deltaX |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The delta value. Positive if the motion was to the right, negative if to the left. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> deltaY
+
+
+
+-
+
+
+ Returns the delta y value. The difference between world.y now and in the previous step.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ deltaY |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The delta value. Positive if the motion was downwards, negative if upwards. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> deltaZ
+
+
+
+-
+
+
+ Returns the delta z value. The difference between rotation now and in the previous step.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ deltaZ |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The delta value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
events
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ events |
+
+
+
+
+
+Phaser.Events
+
+
+
+ |
+
+
+
+
+
+ The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
events
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ events |
+
+
+
+
+
+Phaser.Events
+
+
+
+ |
+
+
+
+
+
+ The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
exists
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ exists |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
exists
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ exists |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
fixedToCamera
+
+
+
+-
+
+
+ A Sprite that is fixed to the camera ignores the position of any ancestors in the display list and uses its x/y coordinates as offsets from the top left of the camera.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ fixedToCamera |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Fixes this Sprite to the Camera. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
fixedToCamera
+
+
+
+-
+
+
+ A Sprite that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera.
+Note that if this Image is a child of a display object that has changed its position then the offset will be calculated from that.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ fixedToCamera |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Fixes this Sprite to the Camera. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
frame
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Gets or sets the current frame index and updates the Texture Cache for display. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
frame
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Gets or sets the current frame index and updates the Texture Cache for display. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
frameName
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ frameName |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ Gets or sets the current frame name and updates the Texture Cache for display. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
frameName
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ frameName |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ Gets or sets the current frame name and updates the Texture Cache for display. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
game
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently running Game. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
game
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently running Game. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
health
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Health value. Used in combination with damage() to allow for quick killing of Sprites. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
health
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Health value. Used in combination with damage() to allow for quick killing of Sprites. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
height
+
+
+
+-
+
+
+ The height of the sprite in pixels, setting this will actually modify the scale to acheive the value desired.
+If you wish to crop the Sprite instead see the Sprite.crop value.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ height |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The height of the Sprite in pixels. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> inCamera
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inCamera |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Is this sprite visible to the camera or not? |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> inCamera
+
+
+
+-
+
+
+ Checks if the Image bounds are within the game camera, otherwise false if fully outside of it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inCamera |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ True if the Image bounds is within the game camera, even if only partially. Otherwise false if fully outside of it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ input |
+
+
+
+
+
+Phaser.InputHandler
+
+
+
+ |
+
+
+
+
+
+ The Input Handler Component. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ input |
+
+
+
+
+
+Phaser.InputHandler
+|
+
+null
+
+
+
+ |
+
+
+
+
+
+ The Input Handler for this object. Needs to be enabled with image.inputEnabled = true before you can use it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+
+-
+
+
+ By default a Sprite won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is
+activated for this Sprite instance and it will then start to process click/touch events and more.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inputEnabled |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Set to true to allow this Sprite to receive input events, otherwise false. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+
+-
+
+
+ By default an Image won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is
+activated for this object and it will then start to process click/touch events and more.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inputEnabled |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Set to true to allow this object to receive input events. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
inWorld
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inWorld |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ This value is set to true if the Sprite is positioned within the World, otherwise false. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> inWorld
+
+
+
+-
+
+
+ Checks if the Image bounds are within the game world, otherwise false if fully outside of it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inWorld |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ True if the Image bounds is within the game world, even if only partially. Otherwise false if fully outside of it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
inWorldThreshold
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inWorldThreshold |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ A threshold value applied to the inWorld check. If you don't want a Sprite to be considered "out of the world" until at least 100px away for example then set it to 100. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
key
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
key
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
lifespan
+
+
+
+-
+
+
+ If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc.
+The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ lifespan |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The lifespan of the Sprite (in ms) before it will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
lifespan
+
+
+
+-
+
+
+ If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc.
+The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ lifespan |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The lifespan of the Sprite (in ms) before it will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
name
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The user defined name given to this Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
name
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The user defined name given to this Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
offset
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ offset |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ Corner point defaults. Should not typically be modified. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
outOfBoundsKill
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ outOfBoundsKill |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If true the Sprite is killed as soon as Sprite.inWorld is false. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
outOfBoundsKill
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ outOfBoundsKill |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If true the Sprite is killed as soon as Sprite.inWorld is false. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
renderOrderID
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ renderOrderID |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Used by the Renderer and Input Manager to control picking order. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> renderOrderID
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ renderOrderID |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The render order ID, reset every frame. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
textureRegion
+
+
+
+-
+
+
+ The rectangular area from the texture that will be rendered.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ textureRegion |
+
+
+
+
+
+Phaser.Rectangle
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
topLeft
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ topLeft |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ A Point containing the top left coordinate of the Sprite. Takes rotation and scale into account. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
topRight
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ topRight |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ A Point containing the top right coordinate of the Sprite. Takes rotation and scale into account. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> type
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ type |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The const type of this object. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> type
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ type |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The const type of this object. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
width
+
+
+
+-
+
+
+ The width of the sprite in pixels, setting this will actually modify the scale to acheive the value desired.
+If you wish to crop the Sprite instead see the Sprite.crop value.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ width |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The width of the Sprite in pixels. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
world
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ world |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ The world coordinates of this Sprite. This differs from the x/y coordinates which are relative to the Sprites container. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
world
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ world |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ The world coordinates of this Sprite. This differs from the x/y coordinates which are relative to the Sprites container. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> worldCenterX
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ worldCenterX |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The center of the Sprite in world coordinates. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
<readonly> worldCenterY
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ worldCenterY |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The center of the Sprite in world coordinates. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
x
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The x coordinate in world space of this Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
y
+
+
+
+-
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The y coordinate in world space of this Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+-
+
bringToTop()
+
+
+
+-
+
+
+
+ Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only
+bought to the top of that Group, not the entire display list.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
bringToTop()
+
+
+
+-
+
+
+
+ Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only
+bought to the top of that Group, not the entire display list.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
centerOn(x, y)
+
+
+
+-
+
+
+
+ Moves the sprite so its center is located on the given x and y coordinates.
+Doesn't change the anchor point of the sprite.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The x coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The y coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
crop(rect)
+
+
+
+-
+
+
+
+ Crop allows you to crop the texture used to display this Image.
+Cropping takes place from the top-left of the Image and can be modified in real-time by providing an updated rectangle object.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ rect |
+
+
+
+
+
+Phaser.Rectangle
+
+
+
+ |
+
+
+
+
+
+ The Rectangle to crop the Image to. Pass null or no parameters to clear a previously set crop rectangle. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
damage(amount)
+
+
+
+-
+
+
+
+ Damages the Sprite, this removes the given amount from the Sprites health property.
+If health is then taken below zero Sprite.kill is called.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ amount |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The amount to subtract from the Sprite.health value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
damage(amount)
+
+
+
+-
+
+
+
+ Damages the Sprite, this removes the given amount from the Sprites health property.
+If health is then taken below zero Sprite.kill is called.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ amount |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The amount to subtract from the Sprite.health value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
deltaX() → {number}
+
+
+
+-
+
+
+
+ Returns the delta x value. The difference between Sprite.x now and in the previous step.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The delta value. Positive if the motion was to the right, negative if to the left.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
deltaY() → {number}
+
+
+
+-
+
+
+
+ Returns the delta x value. The difference between Sprite.y now and in the previous step.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The delta value. Positive if the motion was downwards, negative if upwards.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
destroy()
+
+
+
+-
+
+
+
+ Destroy this Graphics instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
destroy()
+
+
+
+-
+
+
+
+ Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present
+and nulls its reference to game, freeing it up for garbage collection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
destroy()
+
+
+
+-
+
+
+
+ Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present
+and nulls its reference to game, freeing it up for garbage collection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
drawPolygon()
+
+
+
+-
+
+
+
+ /*
+Draws a {Phaser.Polygon} or a {PIXI.Polygon} filled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
getLocalPosition(p, x, y) → {Phaser.Point}
+
+
+
+-
+
+
+
+ Gets the local position of a coordinate relative to the Sprite, factoring in rotation and scale.
+Mostly only used internally.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ p |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ The Point object to store the results in. |
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ x coordinate within the Sprite to translate. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ y coordinate within the Sprite to translate. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The translated point.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.Point
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
getLocalUnmodifiedPosition(p, gx, gy) → {Phaser.Point}
+
+
+
+-
+
+
+
+ Gets the local unmodified position of a coordinate relative to the Sprite, factoring in rotation and scale.
+Mostly only used internally by the Input Manager, but also useful for custom hit detection.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ p |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ The Point object to store the results in. |
+
+
+
+
+
+
+ gx |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ x coordinate within the Sprite to translate. |
+
+
+
+
+
+
+ gy |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ y coordinate within the Sprite to translate. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The translated point.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.Point
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
kill()
+
+
+
+-
+
+
+
+ Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false.
+It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal.
+Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory.
+If you don't need this Sprite any more you should call Sprite.destroy instead.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
kill()
+
+
+
+-
+
+
+
+ Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false.
+It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal.
+Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory.
+If you don't need this Sprite any more you should call Sprite.destroy instead.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
loadTexture(key, frame)
+
+
+
+-
+
+
+
+ Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.
+This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+string
+|
+
+number
+
+
+
+ |
+
+
+
+
+
+ If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
loadTexture(key, frame)
+
+
+
+-
+
+
+
+ Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.
+This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+string
+|
+
+number
+
+
+
+ |
+
+
+
+
+
+ If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
play(name, frameRate, loop, killOnComplete) → {Phaser.Animation}
+
+
+
+-
+
+
+
+ Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
+If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The name of the animation to be played, e.g. "fire", "walk", "jump". |
+
+
+
+
+
+
+ frameRate |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
+
+
+
+
+
+
+ loop |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
+
+
+
+
+
+
+ killOnComplete |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ A reference to playing Animation instance.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.Animation
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
play(name, frameRate, loop, killOnComplete) → {Phaser.Animation}
+
+
+
+-
+
+
+
+ Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
+If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The name of the animation to be played, e.g. "fire", "walk", "jump". |
+
+
+
+
+
+
+ frameRate |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
+
+
+
+
+
+
+ loop |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
+
+
+
+
+
+
+ killOnComplete |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ A reference to playing Animation instance.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.Animation
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
postUpdate()
+
+
+
+-
+
+
+
+ Internal function called by the World postUpdate cycle.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
postUpdate()
+
+
+
+-
+
+
+
+ Internal function called by the World postUpdate cycle.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
preUpdate()
+
+
+
+-
+
+
+
+ Automatically called by World.preUpdate. Handles cache updates, lifespan checks, animation updates and physics updates.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
preUpdate()
+
+
+
+-
+
+
+
+ Automatically called by World.preUpdate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
reset(x, y, health)
+
+
+
+-
+
+
+
+ Resets the Sprite. This places the Sprite at the given x/y world coordinates and then
+sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
+If the Sprite has a physics body that too is reset.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The x coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The y coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
reset(x, y, health)
+
+
+
+-
+
+
+
+ Resets the Sprite. This places the Sprite at the given x/y world coordinates and then
+sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
+If the Sprite has a physics body that too is reset.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The x coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The y coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
resetCrop()
+
+
+
+-
+
+
+
+ Resets the Sprite.crop value back to the frame dimensions.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
revive(health)
+
+
+
+-
+
+
+
+ Brings a 'dead' Sprite back to life, optionally giving it the health value specified.
+A resurrected Sprite has its alive, exists and visible properties all set to true.
+It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
revive(health)
+
+
+
+-
+
+
+
+ Brings a 'dead' Sprite back to life, optionally giving it the health value specified.
+A resurrected Sprite has its alive, exists and visible properties all set to true.
+It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
updateAnimation()
+
+
+
+-
+
+
+
+ Internal function called by preUpdate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
updateBounds()
+
+
+
+-
+
+
+
+ Internal function called by preUpdate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
updateCache()
+
+
+
+-
+
+
+
+ Internal function called by preUpdate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
updateCrop()
+
+
+
+-
+
+
+
+ Internal function called by preUpdate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: Sprite
+
+
+
+
+ Phaser.
+
+ Sprite
+
+
+ Create a new Sprite object. Sprites are the lifeblood of your game, used for nearly everything visual.
+ At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.
+They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),
+events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.
+
+
+
+
+
+
+
+
+
+
+ new Sprite(game, x, y, key, frame)
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently running game. |
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The x coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The y coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. |
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+string
+|
+
+number
+
+
+
+ |
+
+
+
+
+
+ If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source:
-
gameobjects/Sprite.js, line 23
@@ -756,116 +12188,7 @@ events (via Sprite.events), animation (via Sprite.animations), camera culling an
- Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- anchor
-
-
-
-
-
-
- The anchor sets the origin point of the texture.
-The default is 0,0 this means the textures origin is the top left
-Setting than anchor to 0.5,0.5 means the textures origin is centered
-Setting the anchor to 1,1 would mean the textures origin points will be the bottom right
-
-
-
-
-
-
-
-
-
- Properties:
-
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- anchor |
-
-
-
-
-
-Phaser.Point
-
-
-
- |
-
-
-
-
-
- The anchor around which rotation and scaling takes place. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
@@ -973,7 +12296,115 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ angle
+
+
+
+
+
+
+ Indicates the rotation of the Sprite, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
+Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
+If you wish to work in radians instead of degrees use the property Sprite.rotation instead. Working in radians is also a little faster as it doesn't have to convert the angle.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ angle |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The angle of this Image in degrees. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1075,7 +12506,109 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ animations
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ animations |
+
+
+
+
+
+Phaser.AnimationManager
+
+
+
+ |
+
+
+
+
+
+ This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager) |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1185,7 +12718,118 @@ A culled sprite has its renderable property set to 'false'.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ autoCull
+
+
+
+
+
+
+ Should this Sprite be automatically culled if out of range of the camera?
+A culled sprite has its renderable property set to 'false'.
+Be advised this is quite an expensive operation, as it has to calculate the bounds of the object every frame, so only enable it if you really need it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ autoCull |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ A flag indicating if the Sprite should be automatically camera culled or not. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -1287,7 +12931,109 @@ A culled sprite has its renderable property set to 'false'.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ body
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ body |
+
+
+
+
+
+Phaser.Physics.Arcade.Body
+
+
+
+ |
+
+
+
+
+
+ By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1389,7 +13135,7 @@ A culled sprite has its renderable property set to 'false'.
- Source:
@@ -1491,7 +13237,7 @@ A culled sprite has its renderable property set to 'false'.
- Source:
@@ -1599,7 +13345,7 @@ It's used for Camera culling and physics body alignment.
- Source:
@@ -1701,7 +13447,7 @@ It's used for Camera culling and physics body alignment.
- Source:
@@ -1803,7 +13549,7 @@ It's used for Camera culling and physics body alignment.
- Source:
@@ -1910,7 +13656,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2015,7 +13761,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2117,7 +13863,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2222,7 +13968,112 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ debug
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ debug |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Handy flag to use with Game.enableStep |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -2247,7 +14098,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
-
- Returns the delta x value. The difference between Sprite.x now and in the previous step.
+ Returns the delta x value. The difference between world.x now and in the previous step.
@@ -2328,7 +14179,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2353,7 +14204,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
-
- Returns the delta x value. The difference between Sprite.y now and in the previous step.
+ Returns the delta y value. The difference between world.y now and in the previous step.
@@ -2434,7 +14285,113 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <readonly> deltaZ
+
+
+
+
+
+
+ Returns the delta z value. The difference between rotation now and in the previous step.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ deltaZ |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The delta value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -2536,7 +14493,214 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ events
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ events |
+
+
+
+
+
+Phaser.Events
+
+
+
+ |
+
+
+
+
+
+ The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ exists
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ exists |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -2750,7 +14914,117 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ fixedToCamera
+
+
+
+
+
+
+ A Sprite that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera.
+Note that if this Image is a child of a display object that has changed its position then the offset will be calculated from that.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ fixedToCamera |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Fixes this Sprite to the Camera. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -2852,7 +15126,109 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ frame
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Gets or sets the current frame index and updates the Texture Cache for display. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -2954,7 +15330,211 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ frameName
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ frameName |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ Gets or sets the current frame name and updates the Texture Cache for display. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ game
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ game |
+
+
+
+
+
+Phaser.Game
+
+
+
+ |
+
+
+
+
+
+ A reference to the currently running Game. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -3074,7 +15654,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
-
-
group
+ health
@@ -3113,13 +15693,13 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- group |
+ health |
-Phaser.Group
+number
@@ -3129,7 +15709,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- | The parent Group of this Sprite. This is usually set after Sprite instantiation by the parent. |
+ Health value. Used in combination with damage() to allow for quick killing of Sprites. |
@@ -3158,7 +15738,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -3260,7 +15840,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -3367,7 +15947,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -3469,7 +16049,113 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <readonly> inCamera
+
+
+
+
+
+
+ Checks if the Image bounds are within the game camera, otherwise false if fully outside of it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inCamera |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ True if the Image bounds is within the game camera, even if only partially. Otherwise false if fully outside of it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -3571,7 +16257,112 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ input |
+
+
+
+
+
+Phaser.InputHandler
+|
+
+null
+
+
+
+ |
+
+
+
+
+
+ The Input Handler for this object. Needs to be enabled with image.inputEnabled = true before you can use it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -3678,7 +16469,114 @@ activated for this Sprite instance and it will then start to process click/touch
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ By default an Image won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is
+activated for this object and it will then start to process click/touch events and more.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inputEnabled |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Set to true to allow this object to receive input events. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -3780,7 +16678,113 @@ activated for this Sprite instance and it will then start to process click/touch
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <readonly> inWorld
+
+
+
+
+
+
+ Checks if the Image bounds are within the game world, otherwise false if fully outside of it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inWorld |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ True if the Image bounds is within the game world, even if only partially. Otherwise false if fully outside of it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -3885,7 +16889,7 @@ activated for this Sprite instance and it will then start to process click/touch
- Source:
@@ -3996,7 +17000,118 @@ activated for this Sprite instance and it will then start to process click/touch
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -4106,7 +17221,117 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lifespan
+
+
+
+
+
+
+ If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc.
+The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ lifespan |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The lifespan of the Sprite (in ms) before it will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -4208,7 +17433,109 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The user defined name given to this Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -4310,7 +17637,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -4415,7 +17742,112 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ outOfBoundsKill
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ outOfBoundsKill |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If true the Sprite is killed as soon as Sprite.inWorld is false. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -4517,7 +17949,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -4535,7 +17967,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
-
-
scale
+ <readonly> renderOrderID
@@ -4574,13 +18006,13 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- scale |
+ renderOrderID |
-Phaser.Point
+number
@@ -4590,7 +18022,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- | The scale of the Sprite when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc. |
+ The render order ID, reset every frame. |
@@ -4619,7 +18051,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -4725,7 +18157,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -4827,7 +18259,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -4929,7 +18361,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -5031,7 +18463,109 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <readonly> type
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ type |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The const type of this object. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -5138,7 +18672,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -5240,7 +18774,109 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ world
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ world |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ The world coordinates of this Sprite. This differs from the x/y coordinates which are relative to the Sprites container. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -5342,7 +18978,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -5444,7 +19080,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -5546,7 +19182,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -5648,7 +19284,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -5714,7 +19350,88 @@ bought to the top of that Group, not the entire display list.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bringToTop()
+
+
+
+
+
+
+
+ Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only
+bought to the top of that Group, not the entire display list.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -5867,7 +19584,256 @@ Doesn't change the anchor point of the sprite.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ crop(rect)
+
+
+
+
+
+
+
+ Crop allows you to crop the texture used to display this Image.
+Cropping takes place from the top-left of the Image and can be modified in real-time by providing an updated rectangle object.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ rect |
+
+
+
+
+
+Phaser.Rectangle
+
+
+
+ |
+
+
+
+
+
+ The Rectangle to crop the Image to. Pass null or no parameters to clear a previously set crop rectangle. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ damage(amount)
+
+
+
+
+
+
+
+ Damages the Sprite, this removes the given amount from the Sprites health property.
+If health is then taken below zero Sprite.kill is called.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ amount |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The amount to subtract from the Sprite.health value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -5997,7 +19963,7 @@ If health is then taken below zero Sprite.kill is called.
- Source:
@@ -6031,6 +19997,190 @@ If health is then taken below zero Sprite.kill is called.
+
+
+
+
+
+ deltaX() → {number}
+
+
+
+
+
+
+
+ Returns the delta x value. The difference between Sprite.x now and in the previous step.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The delta value. Positive if the motion was to the right, negative if to the left.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deltaY() → {number}
+
+
+
+
+
+
+
+ Returns the delta x value. The difference between Sprite.y now and in the previous step.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The delta value. Positive if the motion was downwards, negative if upwards.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
@@ -6147,7 +20297,147 @@ and nulls its reference to game, freeing it up for garbage collection.
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ destroy()
+
+
+
+
+
+
+
+ Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present
+and nulls its reference to game, freeing it up for garbage collection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ drawPolygon()
+
+
+
+
+
+
+
+ /*
+Draws a {Phaser.Polygon} or a {PIXI.Polygon} filled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -6312,7 +20602,7 @@ Mostly only used internally.
- Source:
@@ -6500,7 +20790,7 @@ Mostly only used internally by the Input Manager, but also useful for custom hit
- Source:
@@ -6595,7 +20885,90 @@ If you don't need this Sprite any more you should call Sprite.destroy instead.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ kill()
+
+
+
+
+
+
+
+ Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false.
+It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal.
+Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory.
+If you don't need this Sprite any more you should call Sprite.destroy instead.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -6760,7 +21133,161 @@ This causes a WebGL texture update, so use sparingly or in low-intensity portion
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ loadTexture(key, frame)
+
+
+
+
+
+
+
+ Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.
+This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+string
+|
+
+number
+
+
+
+ |
+
+
+
+
+
+ If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7012,7 +21539,282 @@ If the requested animation is already playing this request will be ignored. If y
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ A reference to playing Animation instance.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.Animation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ play(name, frameRate, loop, killOnComplete) → {Phaser.Animation}
+
+
+
+
+
+
+
+ Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
+If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The name of the animation to be played, e.g. "fire", "walk", "jump". |
+
+
+
+
+
+
+ frameRate |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
+
+
+
+
+
+
+ loop |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
+
+
+
+
+
+
+ killOnComplete |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7104,7 +21906,76 @@ If the requested animation is already playing this request will be ignored. If y
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ postUpdate()
+
+
+
+
+
+
+
+ Internal function called by the World postUpdate cycle.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7173,7 +22044,76 @@ If the requested animation is already playing this request will be ignored. If y
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ preUpdate()
+
+
+
+
+
+
+
+ Automatically called by World.preUpdate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7383,7 +22323,228 @@ If the Sprite has a physics body that too is reset.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reset(x, y, health)
+
+
+
+
+
+
+
+ Resets the Sprite. This places the Sprite at the given x/y world coordinates and then
+sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
+If the Sprite has a physics body that too is reset.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The x coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The y coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7463,7 +22624,7 @@ If the Sprite has a physics body that too is reset.
- Source:
@@ -7603,7 +22764,158 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ revive(health)
+
+
+
+
+
+
+
+ Brings a 'dead' Sprite back to life, optionally giving it the health value specified.
+A resurrected Sprite has its alive, exists and visible properties all set to true.
+It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7683,7 +22995,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -7752,7 +23064,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -7821,7 +23133,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -7890,7 +23202,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -7941,7 +23253,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:34 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:50 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Stage.html b/docs/Phaser.Stage.html
index bace5b63..c3a06801 100644
--- a/docs/Phaser.Stage.html
+++ b/docs/Phaser.Stage.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -1930,7 +1964,7 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:34 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.StageScaleMode.html b/docs/Phaser.StageScaleMode.html
index 72ea2c10..539c7496 100644
--- a/docs/Phaser.StageScaleMode.html
+++ b/docs/Phaser.StageScaleMode.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -4904,7 +4938,7 @@ Please note that this needs to be supported by the web browser and isn't the sam
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:34 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.State.html b/docs/Phaser.State.html
index d0a995ce..a7006252 100644
--- a/docs/Phaser.State.html
+++ b/docs/Phaser.State.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -2568,7 +2602,7 @@ If you need to use the loader, you may need to use them here.
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:34 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.StateManager.html b/docs/Phaser.StateManager.html
index bd5daaaf..6c14776a 100644
--- a/docs/Phaser.StateManager.html
+++ b/docs/Phaser.StateManager.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -3254,7 +3288,7 @@ State must exist and have at least one callback function registered..
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:34 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Text.html b/docs/Phaser.Text.html
index ea84a034..6b00f9c5 100644
--- a/docs/Phaser.Text.html
+++ b/docs/Phaser.Text.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -2560,7 +2594,7 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:35 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Tile.html b/docs/Phaser.Tile.html
index c6710c82..1ae5a9a1 100644
--- a/docs/Phaser.Tile.html
+++ b/docs/Phaser.Tile.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -3965,7 +3999,7 @@ The callback must true true for collision processing to take place.
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:35 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.TileSprite.html b/docs/Phaser.TileSprite.html
index 04e6138a..29baf294 100644
--- a/docs/Phaser.TileSprite.html
+++ b/docs/Phaser.TileSprite.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -785,121 +819,7 @@
Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- anchor
-
-
-
-
-
-
- The anchor sets the origin point of the texture.
-The default is 0,0 this means the textures origin is the top left
-Setting than anchor to 0.5,0.5 means the textures origin is centered
-Setting the anchor to 1,1 would mean the textures origin points will be the bottom right
-
-
-
-
-
-
-
-
-
- Properties:
-
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- anchor |
-
-
-
-
-
-Phaser.Point
-
-
-
- |
-
-
-
-
-
- The anchor around which rotation and scaling takes place. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Inherited From:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
@@ -1114,7 +1034,114 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ animations
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ animations |
+
+
+
+
+
+Phaser.AnimationManager
+
+
+
+ |
+
+
+
+
+
+ This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager) |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1229,7 +1256,123 @@ A culled sprite has its renderable property set to 'false'.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ autoCull
+
+
+
+
+
+
+ Should this Sprite be automatically culled if out of range of the camera?
+A culled sprite has its renderable property set to 'false'.
+Be advised this is quite an expensive operation, as it has to calculate the bounds of the object every frame, so only enable it if you really need it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ autoCull |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ A flag indicating if the Sprite should be automatically camera culled or not. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -1336,7 +1479,114 @@ A culled sprite has its renderable property set to 'false'.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ body
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ body |
+
+
+
+
+
+Phaser.Physics.Arcade.Body
+
+
+
+ |
+
+
+
+
+
+ By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1443,7 +1693,7 @@ A culled sprite has its renderable property set to 'false'.
- Source:
@@ -1550,7 +1800,7 @@ A culled sprite has its renderable property set to 'false'.
- Source:
@@ -1663,7 +1913,7 @@ It's used for Camera culling and physics body alignment.
- Source:
@@ -1770,7 +2020,7 @@ It's used for Camera culling and physics body alignment.
- Source:
@@ -1877,7 +2127,7 @@ It's used for Camera culling and physics body alignment.
- Source:
@@ -1989,7 +2239,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2099,7 +2349,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2206,7 +2456,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2316,7 +2566,117 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ debug
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ debug |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Handy flag to use with Game.enableStep |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -2341,7 +2701,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
-
- Returns the delta x value. The difference between Sprite.x now and in the previous step.
+ Returns the delta x value. The difference between world.x now and in the previous step.
@@ -2427,7 +2787,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -2452,7 +2812,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
-
- Returns the delta x value. The difference between Sprite.y now and in the previous step.
+ Returns the delta y value. The difference between world.y now and in the previous step.
@@ -2538,7 +2898,118 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <readonly> deltaZ
+
+
+
+
+
+
+ Returns the delta z value. The difference between rotation now and in the previous step.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ deltaZ |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The delta value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -2645,7 +3116,224 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ events
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ events |
+
+
+
+
+
+Phaser.Events
+
+
+
+ |
+
+
+
+
+
+ The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ exists
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ exists |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -2869,7 +3557,122 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ fixedToCamera
+
+
+
+
+
+
+ A Sprite that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera.
+Note that if this Image is a child of a display object that has changed its position then the offset will be calculated from that.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ fixedToCamera |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ Fixes this Sprite to the Camera. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -3180,7 +3983,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -3198,7 +4001,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
-
-
group
+ game
@@ -3237,13 +4040,13 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- group |
+ game |
-Phaser.Group
+Phaser.Game
@@ -3253,7 +4056,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- | The parent Group of this Sprite. This is usually set after Sprite instantiation by the parent. |
+ A reference to the currently running Game. |
@@ -3270,7 +4073,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Inherited From:
@@ -3287,7 +4090,7 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
@@ -3394,7 +4197,114 @@ The crop is only applied if you have set Sprite.cropEnabled to true.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ health
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ Health value. Used in combination with damage() to allow for quick killing of Sprites. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -3506,7 +4416,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -3715,7 +4625,117 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ input |
+
+
+
+
+
+Phaser.InputHandler
+|
+
+null
+
+
+
+ |
+
+
+
+
+
+ The Input Handler for this object. Needs to be enabled with image.inputEnabled = true before you can use it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -3929,7 +4949,118 @@ activated for this Sprite instance and it will then start to process click/touch
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <readonly> inWorld
+
+
+
+
+
+
+ Checks if the Image bounds are within the game world, otherwise false if fully outside of it.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ inWorld |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ True if the Image bounds is within the game world, even if only partially. Otherwise false if fully outside of it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -4039,7 +5170,7 @@ activated for this Sprite instance and it will then start to process click/touch
- Source:
@@ -4155,7 +5286,123 @@ activated for this Sprite instance and it will then start to process click/touch
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -4270,7 +5517,122 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lifespan
+
+
+
+
+
+
+ If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc.
+The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ lifespan |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The lifespan of the Sprite (in ms) before it will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -4377,7 +5739,114 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The user defined name given to this Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -4484,7 +5953,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -4594,7 +6063,117 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ outOfBoundsKill
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ outOfBoundsKill |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ If true the Sprite is killed as soon as Sprite.inWorld is false. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -4701,7 +6280,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -4719,7 +6298,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
-
-
scale
+ <readonly> renderOrderID
@@ -4758,13 +6337,13 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- scale |
+ renderOrderID |
-Phaser.Point
+number
@@ -4774,7 +6353,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- | The scale of the Sprite when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc. |
+ The render order ID, reset every frame. |
@@ -4791,7 +6370,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Inherited From:
@@ -4808,7 +6387,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -5021,7 +6600,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -5332,7 +6911,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -5439,7 +7018,7 @@ The lifespan is decremented by game.time.elapsed each update, once it reaches ze
- Source:
@@ -5653,7 +7232,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -5760,7 +7339,114 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ world
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ world |
+
+
+
+
+
+Phaser.Point
+
+
+
+ |
+
+
+
+
+
+ The world coordinates of this Sprite. This differs from the x/y coordinates which are relative to the Sprites container. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -5867,7 +7553,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -5974,7 +7660,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -6081,7 +7767,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -6188,7 +7874,7 @@ If you wish to crop the Sprite instead see the Sprite.crop value.
- Source:
@@ -6259,7 +7945,93 @@ bought to the top of that Group, not the entire display list.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bringToTop()
+
+
+
+
+
+
+
+ Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only
+bought to the top of that Group, not the entire display list.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -6417,7 +8189,266 @@ Doesn't change the anchor point of the sprite.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ crop(rect)
+
+
+
+
+
+
+
+ Crop allows you to crop the texture used to display this Image.
+Cropping takes place from the top-left of the Image and can be modified in real-time by providing an updated rectangle object.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ rect |
+
+
+
+
+
+Phaser.Rectangle
+
+
+
+ |
+
+
+
+
+
+ The Rectangle to crop the Image to. Pass null or no parameters to clear a previously set crop rectangle. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ damage(amount)
+
+
+
+
+
+
+
+ Damages the Sprite, this removes the given amount from the Sprites health property.
+If health is then taken below zero Sprite.kill is called.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ amount |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The amount to subtract from the Sprite.health value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -6552,7 +8583,7 @@ If health is then taken below zero Sprite.kill is called.
- Source:
@@ -6586,6 +8617,200 @@ If health is then taken below zero Sprite.kill is called.
+
+
+
+
+
+ deltaX() → {number}
+
+
+
+
+
+
+
+ Returns the delta x value. The difference between Sprite.x now and in the previous step.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The delta value. Positive if the motion was to the right, negative if to the left.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deltaY() → {number}
+
+
+
+
+
+
+
+ Returns the delta x value. The difference between Sprite.y now and in the previous step.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The delta value. Positive if the motion was downwards, negative if upwards.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
@@ -6712,7 +8937,157 @@ and nulls its reference to game, freeing it up for garbage collection.
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ destroy()
+
+
+
+
+
+
+
+ Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present
+and nulls its reference to game, freeing it up for garbage collection.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ drawPolygon()
+
+
+
+
+
+
+
+ /*
+Draws a {Phaser.Polygon} or a {PIXI.Polygon} filled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -6882,7 +9257,7 @@ Mostly only used internally.
- Source:
@@ -7075,7 +9450,7 @@ Mostly only used internally by the Input Manager, but also useful for custom hit
- Source:
@@ -7175,7 +9550,95 @@ If you don't need this Sprite any more you should call Sprite.destroy instead.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ kill()
+
+
+
+
+
+
+
+ Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false.
+It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal.
+Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory.
+If you don't need this Sprite any more you should call Sprite.destroy instead.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7345,7 +9808,166 @@ This causes a WebGL texture update, so use sparingly or in low-intensity portion
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ loadTexture(key, frame)
+
+
+
+
+
+
+
+ Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.
+This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+|
+
+Phaser.RenderTexture
+|
+
+Phaser.BitmapData
+|
+
+PIXI.Texture
+
+
+
+ |
+
+
+
+
+
+ This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+string
+|
+
+number
+
+
+
+ |
+
+
+
+
+
+ If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7602,7 +10224,287 @@ If the requested animation is already playing this request will be ignored. If y
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ A reference to playing Animation instance.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.Animation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ play(name, frameRate, loop, killOnComplete) → {Phaser.Animation}
+
+
+
+
+
+
+
+ Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
+If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The name of the animation to be played, e.g. "fire", "walk", "jump". |
+
+
+
+
+
+
+ frameRate |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
+
+
+
+
+
+
+ loop |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
+
+
+
+
+
+
+ killOnComplete |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7699,7 +10601,81 @@ If the requested animation is already playing this request will be ignored. If y
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ postUpdate()
+
+
+
+
+
+
+
+ Internal function called by the World postUpdate cycle.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7773,7 +10749,81 @@ If the requested animation is already playing this request will be ignored. If y
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ preUpdate()
+
+
+
+
+
+
+
+ Automatically called by World.preUpdate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -7988,7 +11038,233 @@ If the Sprite has a physics body that too is reset.
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reset(x, y, health)
+
+
+
+
+
+
+
+ Resets the Sprite. This places the Sprite at the given x/y world coordinates and then
+sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
+If the Sprite has a physics body that too is reset.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The x coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The y coordinate (in world space) to position the Sprite at. |
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -8073,7 +11349,7 @@ If the Sprite has a physics body that too is reset.
- Source:
@@ -8218,7 +11494,163 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ (Phaser.Sprite) This instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ revive(health)
+
+
+
+
+
+
+
+ Brings a 'dead' Sprite back to life, optionally giving it the health value specified.
+A resurrected Sprite has its alive, exists and visible properties all set to true.
+It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ health |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The health to give the Sprite. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -8303,7 +11735,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -8377,7 +11809,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -8451,7 +11883,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -8525,7 +11957,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
- Source:
@@ -8576,7 +12008,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:35 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:52 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Tilemap.html b/docs/Phaser.Tilemap.html
index feae7e2e..789fd2db 100644
--- a/docs/Phaser.Tilemap.html
+++ b/docs/Phaser.Tilemap.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -652,7 +686,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -712,7 +746,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -814,7 +848,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -916,7 +950,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -1027,6 +1061,210 @@ A map may have multiple layers. You can perform operations on the map data such
+
+
+
+
+
+
+
+
+
+ height
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ height |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The height of the map (in tiles). |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ heightInPixels
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ heightInPixels |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The height of the map in pixels based on height * tileHeight. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
@@ -1120,7 +1358,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -1324,7 +1562,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -1426,7 +1664,313 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ orientation
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ orientation |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The orientation of the map data (as specified in Tiled), usually 'orthogonal'. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ properties
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ properties |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ Map specific properties as specified in Tiled. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tileHeight
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ tileHeight |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The base height of the tiles in the map (in pixels). |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1528,7 +2072,7 @@ A map may have multiple layers. You can perform operations on the map data such
- Source:
@@ -1630,7 +2174,415 @@ A map may have multiple layers. You can perform operations on the map data such
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tileWidth
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ tileWidth |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The base width of the tiles in the map (in pixels). |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ version
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ version |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The version of the map data (as specified in Tiled, usually 1). |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ width
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ width |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The width of the map (in tiles). |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ widthInPixels
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ widthInPixels |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The width of the map in pixels based on width * tileWidth. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -1788,7 +2740,125 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <protected> calculateFaces(layer)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The index of the TilemapLayer to operate on. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -2048,7 +3118,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
- Source:
@@ -2235,7 +3305,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
- Source:
@@ -2258,6 +3328,623 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
+
+
+
+
+
+ createFromObjects(name, gid, key, frame, exists, autoCull, group)
+
+
+
+
+
+
+
+ Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is
+given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to
+configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the
+Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The name of the Object Group to create Sprites from. |
+
+
+
+
+
+
+ gid |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. |
+
+
+
+
+
+
+ key |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The Game.cache key of the image that this Sprite will use. |
+
+
+
+
+
+
+ frame |
+
+
+
+
+
+number
+|
+
+string
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ If the Sprite image contains multiple frames you can specify which one to use here. |
+
+
+
+
+
+
+ exists |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ The default exists state of the Sprite. |
+
+
+
+
+
+
+ autoCull |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range. |
+
+
+
+
+
+
+ group |
+
+
+
+
+
+Phaser.Group
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ Optional Group to add the Sprite to. If not specified it will be added to the World group. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ createLayer(layer, width, height, group) → {Phaser.TilemapLayer}
+
+
+
+
+
+
+
+ Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera.
+The layer parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name.
+Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+|
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. |
+
+
+
+
+
+
+ width |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. |
+
+
+
+
+
+
+ height |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. |
+
+
+
+
+
+
+ group |
+
+
+
+
+
+Phaser.Group
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ Optional Group to add the object to. If not specified it will be added to the World group. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.TilemapLayer
+
+
+
+
+
+
+
+
+
@@ -2304,7 +3991,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -2373,7 +4060,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -2664,7 +4351,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -2986,7 +4673,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3009,6 +4696,740 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
+
+
+
+
+
+ getImageIndex(name) → {number}
+
+
+
+
+
+
+
+ Gets the image index based on its name.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The name of the image to get. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The index of the image in this tilemap, or null if not found.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <protected> getIndex(location, name) → {number}
+
+
+
+
+
+
+
+ Gets the layer index based on the layers name.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ location |
+
+
+
+
+
+array
+
+
+
+ |
+
+
+
+
+
+ The local array to search. |
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The name of the array element to get. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The index of the element in the array, or null if not found.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <protected> getLayer(layer) → {number}
+
+
+
+
+
+
+
+ Gets the TilemapLayer index as used in the setCollision calls.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+|
+
+string
+|
+
+Phaser.TilemapLayer
+
+
+
+ |
+
+
+
+
+
+ The layer to operate on. If not given will default to this.currentLayer. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The TilemapLayer index.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getLayerIndex(name) → {number}
+
+
+
+
+
+
+
+ Gets the layer index based on its name.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The name of the layer to get. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The index of the layer in this tilemap, or null if not found.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getObjectIndex(name) → {number}
+
+
+
+
+
+
+
+ Gets the object index based on its name.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The name of the object to get. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The index of the object in this tilemap, or null if not found.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
@@ -3184,7 +5605,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3230,6 +5651,807 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
+
+
+
+
+
+ getTileAbove(layer, x, y)
+
+
+
+
+
+
+
+ Gets the tile above the tile coordinates given.
+Mostly used as an internal function by calculateFaces.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The x coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The y coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getTileBelow(layer, x, y)
+
+
+
+
+
+
+
+ Gets the tile below the tile coordinates given.
+Mostly used as an internal function by calculateFaces.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The x coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The y coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getTileLeft(layer, x, y)
+
+
+
+
+
+
+
+ Gets the tile to the left of the tile coordinates given.
+Mostly used as an internal function by calculateFaces.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The x coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The y coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getTileRight(layer, x, y)
+
+
+
+
+
+
+
+ Gets the tile to the right of the tile coordinates given.
+Mostly used as an internal function by calculateFaces.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The x coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The y coordinate to get the tile from. In tiles, not pixels. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getTilesetIndex(name) → {number}
+
+
+
+
+
+
+
+ Gets the tileset index based on its name.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The name of the tileset to get. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ The index of the tileset in this tilemap, or null if not found.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
@@ -3405,7 +6627,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3657,7 +6879,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3889,7 +7111,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4183,7 +7405,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4443,7 +7665,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4512,7 +7734,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4834,7 +8056,947 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setCollision(indexes, collides, layer)
+
+
+
+
+
+
+
+ Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20].
+The collides parameter controls if collision will be enabled (true) or disabled (false).
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ indexes |
+
+
+
+
+
+number
+|
+
+array
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ Either a single tile index, or an array of tile IDs to be checked for collision. |
+
+
+
+
+
+
+ collides |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ If true it will enable collision. If false it will clear collision. |
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+|
+
+string
+|
+
+Phaser.TilemapLayer
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The layer to operate on. If not given will default to this.currentLayer. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setCollisionBetween(start, stop, collides, layer)
+
+
+
+
+
+
+
+ Sets collision on a range of tiles where the tile IDs increment sequentially.
+Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14.
+The collides parameter controls if collision will be enabled (true) or disabled (false).
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ start |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The first index of the tile to be set for collision. |
+
+
+
+
+
+
+ stop |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The last index of the tile to be set for collision. |
+
+
+
+
+
+
+ collides |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ If true it will enable collision. If false it will clear collision. |
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+|
+
+string
+|
+
+Phaser.TilemapLayer
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The layer to operate on. If not given will default to this.currentLayer. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setCollisionByExclusion(indexes, collides, layer)
+
+
+
+
+
+
+
+ Sets collision on all tiles in the given layer, except for the IDs of those in the given array.
+The collides parameter controls if collision will be enabled (true) or disabled (false).
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ indexes |
+
+
+
+
+
+array
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ An array of the tile IDs to not be counted for collision. |
+
+
+
+
+
+
+ collides |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ If true it will enable collision. If false it will clear collision. |
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+|
+
+string
+|
+
+Phaser.TilemapLayer
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The layer to operate on. If not given will default to this.currentLayer. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <protected> setCollisionByIndex(index, collides, layer, recalculate)
+
+
+
+
+
+
+
+ Sets collision values on a tile in the set.
+You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ index |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The index of the tile on the layer. |
+
+
+
+
+
+
+ collides |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ If true it will enable collision on the tile. If false it will clear collision values from the tile. |
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The layer to operate on. If not given will default to this.currentLayer. |
+
+
+
+
+
+
+ recalculate |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Recalculates the tile faces after the update. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -4958,7 +9120,565 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
- Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setTileIndexCallback(indexes, callback, callbackContext, layer)
+
+
+
+
+
+
+
+ Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index.
+If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.
+If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ indexes |
+
+
+
+
+
+number
+|
+
+array
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ Either a single tile index, or an array of tile indexes to have a collision callback set for. |
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The callback that will be invoked when the tile is collided with. |
+
+
+
+
+
+
+ callbackContext |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The context under which the callback is called. |
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+|
+
+string
+|
+
+Phaser.TilemapLayer
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ The layer to operate on. If not given will default to this.currentLayer. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setTileLocationCallback(x, y, width, height, callback, callbackContext, layer)
+
+
+
+
+
+
+
+ Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index.
+If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.
+If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ x |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ X position of the top left of the area to copy (given in tiles, not pixels) |
+
+
+
+
+
+
+ y |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ Y position of the top left of the area to copy (given in tiles, not pixels) |
+
+
+
+
+
+
+ width |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The width of the area to copy (given in tiles, not pixels) |
+
+
+
+
+
+
+ height |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The height of the area to copy (given in tiles, not pixels) |
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The callback that will be invoked when the tile is collided with. |
+
+
+
+
+
+
+ callbackContext |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The context under which the callback is called. |
+
+
+
+
+
+
+ layer |
+
+
+
+
+
+number
+|
+
+string
+|
+
+Phaser.TilemapLayer
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ The layer to operate on. If not given will default to this.currentLayer. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
@@ -5218,7 +9938,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
- Source:
@@ -5540,7 +10260,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
- Source:
@@ -5591,7 +10311,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:35 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.TilemapLayer.html b/docs/Phaser.TilemapLayer.html
index 6324e83e..fd9324a7 100644
--- a/docs/Phaser.TilemapLayer.html
+++ b/docs/Phaser.TilemapLayer.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -4600,7 +4634,7 @@ half as quickly as the 'normal' camera-locked layers do) |
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:35 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:52 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.TilemapParser.html b/docs/Phaser.TilemapParser.html
index 8da89b64..00666bcf 100644
--- a/docs/Phaser.TilemapParser.html
+++ b/docs/Phaser.TilemapParser.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -1443,7 +1477,7 @@
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:35 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:52 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Tileset.html b/docs/Phaser.Tileset.html
index 2a1cd745..f33eb683 100644
--- a/docs/Phaser.Tileset.html
+++ b/docs/Phaser.Tileset.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -1835,124 +1869,6 @@ You should not normally instantiate this class directly.
--
-
<protected> calculateFaces(layer)
-
-
-
--
-
-
-
-
-
-
-
-
-
-
-
Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The index of the TilemapLayer to operate on. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
checkTileIndex(index) → {boolean}
@@ -2094,1355 +2010,6 @@ You should not normally instantiate this class directly.
-
-
-
-
--
-
createFromObjects(name, gid, key, frame, exists, autoCull, group)
-
-
-
- -
-
-
-
-
Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is
-given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to
-configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the
-Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
- Default |
-
-
- Description |
-
-
-
-
-
-
-
-
- name |
-
-
-
-
-
-string
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The name of the Object Group to create Sprites from. |
-
-
-
-
-
-
- gid |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. |
-
-
-
-
-
-
- key |
-
-
-
-
-
-string
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The Game.cache key of the image that this Sprite will use. |
-
-
-
-
-
-
- frame |
-
-
-
-
-
-number
-|
-
-string
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- If the Sprite image contains multiple frames you can specify which one to use here. |
-
-
-
-
-
-
- exists |
-
-
-
-
-
-boolean
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- true
-
- |
-
-
- The default exists state of the Sprite. |
-
-
-
-
-
-
- autoCull |
-
-
-
-
-
-boolean
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- true
-
- |
-
-
- The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range. |
-
-
-
-
-
-
- group |
-
-
-
-
-
-Phaser.Group
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- Optional Group to add the Sprite to. If not specified it will be added to the World group. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
createLayer(layer, width, height, group) → {Phaser.TilemapLayer}
-
-
-
--
-
-
-
-
Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-|
-
-string
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. |
-
-
-
-
-
-
- width |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
- The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. |
-
-
-
-
-
-
- height |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
- The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. |
-
-
-
-
-
-
- group |
-
-
-
-
-
-Phaser.Group
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
- Optional Group to add the object to. If not specified it will be added to the World group. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly.
-
-
-
-
-
- -
- Type
-
- -
-
-Phaser.TilemapLayer
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
getImageIndex(name) → {number}
-
-
-
--
-
-
-
-
Gets the image index based on its name.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- name |
-
-
-
-
-
-string
-
-
-
- |
-
-
-
-
-
- The name of the image to get. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
The index of the image in this tilemap, or null if not found.
-
-
-
-
-
- -
- Type
-
- -
-
-number
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
<protected> getIndex(location, name) → {number}
-
-
-
--
-
-
-
-
Gets the layer index based on the layers name.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- location |
-
-
-
-
-
-array
-
-
-
- |
-
-
-
-
-
- The local array to search. |
-
-
-
-
-
-
- name |
-
-
-
-
-
-string
-
-
-
- |
-
-
-
-
-
- The name of the array element to get. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
The index of the element in the array, or null if not found.
-
-
-
-
-
- -
- Type
-
- -
-
-number
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
<protected> getLayer(layer) → {number}
-
-
-
--
-
-
-
-
Gets the TilemapLayer index as used in the setCollision calls.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-|
-
-string
-|
-
-Phaser.TilemapLayer
-
-
-
- |
-
-
-
-
-
- The layer to operate on. If not given will default to this.currentLayer. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
The TilemapLayer index.
-
-
-
-
-
- -
- Type
-
- -
-
-number
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
getLayerIndex(name) → {number}
-
-
-
--
-
-
-
-
Gets the layer index based on its name.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- name |
-
-
-
-
-
-string
-
-
-
- |
-
-
-
-
-
- The name of the layer to get. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
The index of the layer in this tilemap, or null if not found.
-
-
-
-
-
- -
- Type
-
- -
-
-number
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
getObjectIndex(name) → {number}
-
-
-
--
-
-
-
-
Gets the object index based on its name.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- name |
-
-
-
-
-
-string
-
-
-
- |
-
-
-
-
-
- The name of the object to get. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
The index of the object in this tilemap, or null if not found.
-
-
-
-
-
- -
- Type
-
- -
-
-number
-
-
-
-
-
-
-
-
-
@@ -3588,807 +2155,6 @@ Sprite is created. You could also give it a value like: body.velocity.x: 100 to
-
-
-
-
--
-
getTileAbove(layer, x, y)
-
-
-
--
-
-
-
-
Gets the tile above the tile coordinates given.
-Mostly used as an internal function by calculateFaces.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
-
-
-
-
-
-
- x |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The x coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
- y |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The y coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
getTileBelow(layer, x, y)
-
-
-
--
-
-
-
-
Gets the tile below the tile coordinates given.
-Mostly used as an internal function by calculateFaces.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
-
-
-
-
-
-
- x |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The x coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
- y |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The y coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
getTileLeft(layer, x, y)
-
-
-
--
-
-
-
-
Gets the tile to the left of the tile coordinates given.
-Mostly used as an internal function by calculateFaces.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
-
-
-
-
-
-
- x |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The x coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
- y |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The y coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
getTileRight(layer, x, y)
-
-
-
--
-
-
-
-
Gets the tile to the right of the tile coordinates given.
-Mostly used as an internal function by calculateFaces.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
-
-
-
-
-
-
- x |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The x coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
- y |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
- The y coordinate to get the tile from. In tiles, not pixels. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
getTilesetIndex(name) → {number}
-
-
-
--
-
-
-
-
Gets the tileset index based on its name.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- name |
-
-
-
-
-
-string
-
-
-
- |
-
-
-
-
-
- The name of the tileset to get. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
The index of the tileset in this tilemap, or null if not found.
-
-
-
-
-
- -
- Type
-
- -
-
-number
-
-
-
-
-
-
-
-
-
@@ -4679,946 +2445,6 @@ Mostly used as an internal function by calculateFaces.
-
-
-
-
--
-
setCollision(indexes, collides, layer)
-
-
-
--
-
-
-
-
Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20].
-The collides parameter controls if collision will be enabled (true) or disabled (false).
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
- Default |
-
-
- Description |
-
-
-
-
-
-
-
-
- indexes |
-
-
-
-
-
-number
-|
-
-array
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- Either a single tile index, or an array of tile IDs to be checked for collision. |
-
-
-
-
-
-
- collides |
-
-
-
-
-
-boolean
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- true
-
- |
-
-
- If true it will enable collision. If false it will clear collision. |
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-|
-
-string
-|
-
-Phaser.TilemapLayer
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The layer to operate on. If not given will default to this.currentLayer. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
setCollisionBetween(start, stop, collides, layer)
-
-
-
--
-
-
-
-
Sets collision on a range of tiles where the tile IDs increment sequentially.
-Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14.
-The collides parameter controls if collision will be enabled (true) or disabled (false).
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
- Default |
-
-
- Description |
-
-
-
-
-
-
-
-
- start |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The first index of the tile to be set for collision. |
-
-
-
-
-
-
- stop |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The last index of the tile to be set for collision. |
-
-
-
-
-
-
- collides |
-
-
-
-
-
-boolean
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- true
-
- |
-
-
- If true it will enable collision. If false it will clear collision. |
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-|
-
-string
-|
-
-Phaser.TilemapLayer
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The layer to operate on. If not given will default to this.currentLayer. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
setCollisionByExclusion(indexes, collides, layer)
-
-
-
--
-
-
-
-
Sets collision on all tiles in the given layer, except for the IDs of those in the given array.
-The collides parameter controls if collision will be enabled (true) or disabled (false).
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
- Default |
-
-
- Description |
-
-
-
-
-
-
-
-
- indexes |
-
-
-
-
-
-array
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- An array of the tile IDs to not be counted for collision. |
-
-
-
-
-
-
- collides |
-
-
-
-
-
-boolean
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- true
-
- |
-
-
- If true it will enable collision. If false it will clear collision. |
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-|
-
-string
-|
-
-Phaser.TilemapLayer
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The layer to operate on. If not given will default to this.currentLayer. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
<protected> setCollisionByIndex(index, collides, layer, recalculate)
-
-
-
--
-
-
-
-
Sets collision values on a tile in the set.
-You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
- Default |
-
-
- Description |
-
-
-
-
-
-
-
-
- index |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The index of the tile on the layer. |
-
-
-
-
-
-
- collides |
-
-
-
-
-
-boolean
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- true
-
- |
-
-
- If true it will enable collision on the tile. If false it will clear collision values from the tile. |
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- The layer to operate on. If not given will default to this.currentLayer. |
-
-
-
-
-
-
- recalculate |
-
-
-
-
-
-boolean
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
-
- true
-
- |
-
-
- Recalculates the tile faces after the update. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -5782,564 +2608,6 @@ You shouldn't usually call this method directly, instead use setCollision, setCo
-
-
-
-
--
-
setTileIndexCallback(indexes, callback, callbackContext, layer)
-
-
-
--
-
-
-
-
Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index.
-If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.
-If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- indexes |
-
-
-
-
-
-number
-|
-
-array
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- Either a single tile index, or an array of tile indexes to have a collision callback set for. |
-
-
-
-
-
-
- callback |
-
-
-
-
-
-function
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- The callback that will be invoked when the tile is collided with. |
-
-
-
-
-
-
- callbackContext |
-
-
-
-
-
-object
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- The context under which the callback is called. |
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-|
-
-string
-|
-
-Phaser.TilemapLayer
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
- The layer to operate on. If not given will default to this.currentLayer. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
setTileLocationCallback(x, y, width, height, callback, callbackContext, layer)
-
-
-
--
-
-
-
-
Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index.
-If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.
-If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- | Name |
-
-
- Type |
-
-
- Argument |
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- x |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- X position of the top left of the area to copy (given in tiles, not pixels) |
-
-
-
-
-
-
- y |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- Y position of the top left of the area to copy (given in tiles, not pixels) |
-
-
-
-
-
-
- width |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- The width of the area to copy (given in tiles, not pixels) |
-
-
-
-
-
-
- height |
-
-
-
-
-
-number
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- The height of the area to copy (given in tiles, not pixels) |
-
-
-
-
-
-
- callback |
-
-
-
-
-
-function
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- The callback that will be invoked when the tile is collided with. |
-
-
-
-
-
-
- callbackContext |
-
-
-
-
-
-object
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
- The context under which the callback is called. |
-
-
-
-
-
-
- layer |
-
-
-
-
-
-number
-|
-
-string
-|
-
-Phaser.TilemapLayer
-
-
-
- |
-
-
-
-
- <optional>
-
-
-
-
-
- |
-
-
-
-
- The layer to operate on. If not given will default to this.currentLayer. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -6368,7 +2636,7 @@ If you want to set a callback for a tile at a specific location on the map then
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:35 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:52 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Time.html b/docs/Phaser.Time.html
index 8daece68..4206af8f 100644
--- a/docs/Phaser.Time.html
+++ b/docs/Phaser.Time.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -3082,7 +3116,7 @@
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:36 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:52 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Timer.html b/docs/Phaser.Timer.html
index 0457fc84..62f289d1 100644
--- a/docs/Phaser.Timer.html
+++ b/docs/Phaser.Timer.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -1049,7 +1083,7 @@ So if you want to fire an event every quarter of a second you'd need to set the
Source:
@@ -1460,7 +1494,7 @@ So if you want to fire an event every quarter of a second you'd need to set the
Source:
@@ -1562,7 +1596,7 @@ So if you want to fire an event every quarter of a second you'd need to set the
Source:
@@ -1664,7 +1698,7 @@ So if you want to fire an event every quarter of a second you'd need to set the
Source:
@@ -2180,7 +2214,7 @@ So if you want to fire an event every quarter of a second you'd need to set the
Source:
@@ -2493,7 +2527,7 @@ If the Timer is already running the delay will be calculated based on the timers
Source:
@@ -2880,7 +2914,7 @@ If the Timer is already running the delay will be calculated based on the timers
Source:
@@ -3347,7 +3381,7 @@ If the Timer is already running the delay will be calculated based on the timers
Source:
@@ -3746,7 +3780,7 @@ If the Timer is already running the delay will be calculated based on the timers
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:36 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:52 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.TimerEvent.html b/docs/Phaser.TimerEvent.html
index ca35f0e0..6cffa887 100644
--- a/docs/Phaser.TimerEvent.html
+++ b/docs/Phaser.TimerEvent.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -1229,6 +1263,108 @@ It can call a specific callback, passing in optional parameters.
+
+
+
+
+
+
+
+
+
+ <protected> pendingDelete
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ pendingDelete |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ A flag that controls if the TimerEvent is pending deletion. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
@@ -1569,7 +1705,7 @@ It can call a specific callback, passing in optional parameters.
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:36 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:52 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Touch.html b/docs/Phaser.Touch.html
index 0bcca464..db008289 100644
--- a/docs/Phaser.Touch.html
+++ b/docs/Phaser.Touch.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -2641,7 +2675,7 @@ Doesn't appear to be supported by most browsers on a canvas element yet.
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:36 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:53 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Tween.html b/docs/Phaser.Tween.html
index 1730684c..c4c94645 100644
--- a/docs/Phaser.Tween.html
+++ b/docs/Phaser.Tween.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -3130,7 +3164,7 @@ Used in combination with repeat you can create endless loops.
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:36 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:53 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.TweenManager.html b/docs/Phaser.TweenManager.html
index 93737650..8ef46d6d 100644
--- a/docs/Phaser.TweenManager.html
+++ b/docs/Phaser.TweenManager.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -1634,7 +1668,7 @@ Please see https://github.com/sole/tw
Documentation generated by JSDoc 3.3.0-dev
- on Wed Feb 05 2014 06:28:36 GMT-0000 (GMT) using the DocStrap template.
+ on Sat Feb 08 2014 07:19:53 GMT-0000 (GMT) using the DocStrap template.
diff --git a/docs/Phaser.Utils.Debug.html b/docs/Phaser.Utils.Debug.html
index f4c4033c..72d1b6ee 100644
--- a/docs/Phaser.Utils.Debug.html
+++ b/docs/Phaser.Utils.Debug.html
@@ -182,6 +182,10 @@
Group
+
+ Image
+
+
Input
@@ -398,6 +402,36 @@
+
+ Global
+
+
+
+
@@ -2316,7 +2350,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
Source:
@@ -3109,7 +3143,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
Source:
@@ -4164,7 +4198,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
Source:
@@ -4333,7 +4367,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
- renderRectangle(rect, color)
+ renderRectangle(rect, color, filled)
@@ -4367,6 +4401,8 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
+ Default |
+
Description |
@@ -4400,6 +4436,10 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
+