You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/actions/SetHitArea.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
*
17
17
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
18
18
* @param {*} hitArea - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
19
-
* @param {HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.
19
+
* @param {Phaser.Input.Types.HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.
20
20
*
21
21
* @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
* @param {(Phaser.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
390
-
* @param {HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.
389
+
* @param {(Phaser.Input.Types.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
390
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.
391
391
* @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?
* @property {Phaser.GameObjects.GameObject} gameObject - The Game Object to which this Interactive Object is bound.
22
-
* @property {boolean} enabled - Is this Interactive Object currently enabled for input events?
23
-
* @property {boolean} draggable - Is this Interactive Object draggable? Enable with `InputPlugin.setDraggable`.
24
-
* @property {boolean} dropZone - Is this Interactive Object a drag-targets drop zone? Set when the object is created.
25
-
* @property {(boolean|string)} cursor - Should this Interactive Object change the cursor (via css) when over? (desktop only)
26
-
* @property {?Phaser.GameObjects.GameObject} target - An optional drop target for a draggable Interactive Object.
27
-
* @property {Phaser.Cameras.Scene2D.Camera} camera - The most recent Camera to be tested against this Interactive Object.
28
-
* @property {any} hitArea - The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.
29
-
* @property {HitAreaCallback} hitAreaCallback - The 'contains' check callback that the hit area shape will use for all hit tests.
30
-
* @property {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.
31
-
* @property {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.
32
-
* @property {(0|1|2)} dragState - The current drag state of this Interactive Object. 0 = Not being dragged, 1 = being checked for drag, or 2 = being actively dragged.
33
-
* @property {number} dragStartX - The x coordinate that the Pointer started dragging this Interactive Object from.
34
-
* @property {number} dragStartY - The y coordinate that the Pointer started dragging this Interactive Object from.
35
-
* @property {number} dragX - The x coordinate that this Interactive Object is currently being dragged to.
36
-
* @property {number} dragY - The y coordinate that this Interactive Object is currently being dragged to.
37
-
*/
38
-
39
7
/**
40
8
* Creates a new Interactive Object.
41
9
*
@@ -48,9 +16,9 @@
48
16
*
49
17
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to which this Interactive Object is bound.
50
18
* @param {any} hitArea - The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.
51
-
* @param {HitAreaCallback} hitAreaCallback - The 'contains' check callback that the hit area shape will use for all hit tests.
19
+
* @param {Phaser.Input.Types.HitAreaCallback} hitAreaCallback - The 'contains' check callback that the hit area shape will use for all hit tests.
52
20
*
53
-
* @return {Phaser.Input.InteractiveObject} The new Interactive Object.
21
+
* @return {Phaser.Input.Types.InteractiveObject} The new Interactive Object.
Copy file name to clipboardExpand all lines: src/input/InputPlugin.js
+10-23Lines changed: 10 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -209,7 +209,7 @@ var InputPlugin = new Class({
209
209
* Internal event propagation callback container.
210
210
*
211
211
* @name Phaser.Input.InputPlugin#_eventContainer
212
-
* @type {Phaser.Input.EventData}
212
+
* @type {Phaser.Input.Types.EventData}
213
213
* @private
214
214
* @since 3.13.0
215
215
*/
@@ -723,8 +723,8 @@ var InputPlugin = new Class({
723
723
* @since 3.0.0
724
724
*
725
725
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to be enabled for input.
726
-
* @param {(Phaser.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
727
-
* @param {HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.
726
+
* @param {(Phaser.Input.Types.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
727
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.
728
728
* @param {boolean} [dropZone=false] - Is this Game Object a drop zone or not?
729
729
*
730
730
* @return {Phaser.Input.InputPlugin} This Input Plugin.
@@ -1654,19 +1654,6 @@ var InputPlugin = new Class({
* @property {any} [hitArea] - The object / shape to use as the Hit Area. If not given it will try to create a Rectangle based on the texture frame.
1661
-
* @property {function} [hitAreaCallback] - The callback that determines if the pointer is within the Hit Area shape or not.
1662
-
* @property {boolean} [draggable=false] - If `true` the Interactive Object will be set to be draggable and emit drag events.
1663
-
* @property {boolean} [dropZone=false] - If `true` the Interactive Object will be set to be a drop zone for draggable objects.
1664
-
* @property {boolean} [useHandCursor=false] - If `true` the Interactive Object will set the `pointer` hand cursor when a pointer is over it. This is a short-cut for setting `cursor: 'pointer'`.
1665
-
* @property {string} [cursor] - The CSS string to be used when the cursor is over this Interactive Object.
1666
-
* @property {boolean} [pixelPerfect=false] - If `true` the a pixel perfect function will be set for the hit area callback. Only works with texture based Game Objects.
1667
-
* @property {integer} [alphaTolerance=1] - If `pixelPerfect` is set, this is the alpha tolerance threshold value used in the callback.
1668
-
*/
1669
-
1670
1657
/**
1671
1658
* Sets the hit area for the given array of Game Objects.
1672
1659
*
@@ -1684,8 +1671,8 @@ var InputPlugin = new Class({
1684
1671
* @since 3.0.0
1685
1672
*
1686
1673
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set the hit area on.
1687
-
* @param {(Phaser.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
1688
-
* @param {HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.
1674
+
* @param {(Phaser.Input.Types.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
1675
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.
1689
1676
*
1690
1677
* @return {Phaser.Input.InputPlugin} This InputPlugin object.
1691
1678
*/
@@ -1772,7 +1759,7 @@ var InputPlugin = new Class({
1772
1759
* @param {number} x - The center of the circle.
1773
1760
* @param {number} y - The center of the circle.
1774
1761
* @param {number} radius - The radius of the circle.
1775
-
* @param {HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains.
1762
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains.
1776
1763
*
1777
1764
* @return {Phaser.Input.InputPlugin} This InputPlugin object.
1778
1765
*/
@@ -1797,7 +1784,7 @@ var InputPlugin = new Class({
1797
1784
* @param {number} y - The center of the ellipse.
1798
1785
* @param {number} width - The width of the ellipse.
1799
1786
* @param {number} height - The height of the ellipse.
1800
-
* @param {HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains.
1787
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains.
1801
1788
*
1802
1789
* @return {Phaser.Input.InputPlugin} This InputPlugin object.
1803
1790
*/
@@ -1818,7 +1805,7 @@ var InputPlugin = new Class({
1818
1805
* @since 3.0.0
1819
1806
*
1820
1807
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area.
1821
-
* @param {HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.
1808
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.
1822
1809
*
1823
1810
* @return {Phaser.Input.InputPlugin} This InputPlugin object.
1824
1811
*/
@@ -1880,7 +1867,7 @@ var InputPlugin = new Class({
1880
1867
* @param {number} y - The top-left of the rectangle.
1881
1868
* @param {number} width - The width of the rectangle.
1882
1869
* @param {number} height - The height of the rectangle.
1883
-
* @param {HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.
1870
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.
1884
1871
*
1885
1872
* @return {Phaser.Input.InputPlugin} This InputPlugin object.
1886
1873
*/
@@ -1907,7 +1894,7 @@ var InputPlugin = new Class({
1907
1894
* @param {number} y2 - The y coordinate of the second point of the triangle.
1908
1895
* @param {number} x3 - The x coordinate of the third point of the triangle.
1909
1896
* @param {number} y3 - The y coordinate of the third point of the triangle.
1910
-
* @param {HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains.
1897
+
* @param {Phaser.Input.Types.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains.
1911
1898
*
1912
1899
* @return {Phaser.Input.InputPlugin} This InputPlugin object.
Copy file name to clipboardExpand all lines: src/input/events/GAMEOBJECT_DOWN_EVENT.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,6 @@
30
30
*
31
31
* @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.
32
32
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was pressed down on.
33
-
* @param {Phaser.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.
33
+
* @param {Phaser.Input.Types.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.
Copy file name to clipboardExpand all lines: src/input/events/GAMEOBJECT_MOVE_EVENT.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,6 @@
30
30
*
31
31
* @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.
32
32
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was moved on.
33
-
* @param {Phaser.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.
33
+
* @param {Phaser.Input.Types.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.
0 commit comments