photonstorm
c64749fef2
Added missing properties.
2016-06-09 14:54:39 +01:00
photonstorm
92d3a5efa8
Adds a callback that is fired every time 'Pointer.processInteractiveObjects' is called.
...
The purpose of `processInteractiveObjects` is to work out which Game Object the Pointer is going to
interact with. It works by polling all of the valid game objects, and then slowly discounting those
that don't meet the criteria (i.e. they aren't under the Pointer, are disabled, invisible, etc).
Eventually a short-list of 'candidates' is created. These are all of the Game Objects which are valid
for input and overlap with the Pointer. If you need fine-grained control over which of the items is
selected then you can use this callback to do so.
The callback will be sent 3 parameters:
1) A reference to the Phaser.Pointer object that is processing the Items.
2) An array containing all potential interactive candidates. This is an array of `InputHandler` objects, not Sprites.
3) The current 'favorite' candidate, based on its priorityID and position in the display list.
Your callback MUST return one of the candidates sent to it.
2016-06-09 14:49:10 +01:00
photonstorm
7c2d1d4ab8
Pointer.interactiveCandidates is a new Array that is erased and re-populated every time this Pointer is updated. It contains references to all of the Game Objects that were considered as being valid for processing by this Pointer, during the most recent update. To be valid they must have suitable a priorityID
, be Input enabled, be visible and actually have the Pointer over them. You can check the contents of this array in events such as onInputDown
, but beware: it is reset every update.
...
Pointer.swapTarget allows you to change the `Pointer.targetObject` object to be the one provided. This allows you to have fine-grained control over which object the Pointer is targeting.
2016-06-09 14:36:15 +01:00
photonstorm
fa43bec19f
PIXI.DisplayObjectContainer.ignoreChildInput is a new property. If true
then the children will _not_ be considered as valid for Input events. Because this has been applied to DisplayObjectContainer
it means it's available in Group, Sprite and any other display level object. Using this boolean you can disable input events for all children in an entire Group, without having to iterate anything or deep-set flags.
...
InputHandler._pointerOverHandler and _pointerOutHandler have new arguments `silent` - if `true` then they will not dispatch any Signals from the parent Sprite.
2016-06-09 14:32:56 +01:00
photonstorm
e8e7e27184
The DisplayObject.renderOrderID
used to run in reverse. I.e. in a display list with 10 sprites on it, the first sprite (at the bottom of the list, rendering behind all the others) would have a renderOrderID
of 9, where-as the top-most sprite, rendering above all others, would have a renderOrderID
of 0. While this didn't cause any side-effects internally, it's arguably illogical. So the process has been reversed, and renderOrderID
s are now accumulative, starting at zero each frame, and increasing as it iterates down the display list. So the higher the ID, the more "on-top" of the output the object is.
...
`InputHandler.validForInput` and `Pointer.processInteractiveObjects` have been updated to reflect the new `renderOrderID` sequence (see above).
2016-06-09 12:32:37 +01:00
photonstorm
e5c4f7729d
Docs update.
2016-06-09 11:37:01 +01:00
Richard Davey
53c579a50c
Merge pull request #2545 from fillmoreb/patch-3
...
Fix Phaser.Rectangle.aabb()
2016-06-09 11:30:19 +01:00
Richard Davey
3f9cb15de3
Merge pull request #2546 from Upperfoot/dev
...
Resolved issue with tilemapLayer collision.
2016-06-09 00:16:14 +01:00
Upperfoot
bab2fac729
Resolved issue with tilemapLayer collision.
2016-06-08 23:52:56 +01:00
fillmoreb
3f5de71add
Fixe Phaser.Rectangle.aabb()
...
Number.MIN_VALUE does not return the most negative number, but rather the smallest representable number above 0. As a result, Phaser.Rectangle.aabb() did not work correctly when the points had negative values.
2016-06-08 16:14:30 -06:00
Richard Davey
027c8b7007
Merge pull request #2541 from Upperfoot/dev
...
Fixed problem with missing parameter in tileCheckX and tileCheckY.
2016-06-07 14:08:02 +01:00
Craig Whiteside
212a07b9ac
Fixed problem with missing parameter in tileCheckX and tileCheckY.
2016-06-07 14:00:34 +01:00
Richard Davey
1956d3584e
InputHandler.dragStopBlocksInputUp is a boolean that allows you to control what happens with the input events. If false
(the default) then both the onInputUp
and onDragStop
events will get dispatched when a Sprite stops being dragged. If true
then only the onDragStop
event is dispatched, and the onInputUp
is skipped.
2016-06-07 02:21:12 +01:00
Richard Davey
913936f080
jshint fix.
2016-06-07 01:50:38 +01:00
Richard Davey
df92c45420
There are two new Phaser consts available, for help with orientation of games or Game Objects. They are Phaser.HORIZONTAL
, Phaser.VERTICAL
, Phaser.LANDSCAPE
and Phaser.PORTRAIT
.
2016-06-07 01:45:33 +01:00
Richard Davey
66b846cbdb
InputHandler.dragDistanceThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a distance, in pixels, that the pointer must have moved before the drag will begin.
...
InputHandler.dragTimeThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a time, in ms that the pointer must have been held down for, before the drag will begin.
InputHandler.downPoint is a new Point object that contains the coordinates of the Pointer when it was first pressed down on the Sprite.
2016-06-07 01:28:06 +01:00
Richard Davey
f3a211e42d
Merge pull request #2536 from Upperfoot/dev
...
Fixed typo on collision for TileMapLayers (lesson to triple check you…
2016-06-06 16:47:40 +01:00
Craig Whiteside
7a1667fa7e
Fixed typo on collision for TileMapLayers (lesson to triple check your code...)
2016-06-06 15:43:51 +01:00
photonstorm
5492ed0d64
Docs update.
2016-06-06 11:15:38 +01:00
Richard Davey
5bcc26e366
Merge pull request #2535 from BaroqueEngine/dev
...
Fixed typescript definitions: ArrayUtils.rotateMatrix and ArrayUtils.numberArrayStep
2016-06-06 11:14:28 +01:00
BaroqueEngine
042fc28513
Fixed typescript definitions: ArrayUtils.rotateMatrix and ArrayUtils.numberArrayStep
2016-06-06 17:27:32 +09:00
Richard Davey
a180882d27
Fixed the data object not being created.
2016-06-06 00:31:46 +01:00
Richard Davey
de3d749385
Farthest swapped for the more common Furthest.
2016-06-05 23:01:00 +01:00
Richard Davey
56759f46fd
Docs update.
2016-06-05 21:23:13 +01:00
Richard Davey
1b67850c82
Merge pull request #2529 from TheJasonReynolds/local_dev
...
Set isPlaying to true if no marker (.play is not called again)
2016-06-05 15:51:43 +01:00
Richard Davey
050308018a
Merge pull request #2530 from johnrees/patch-1
...
Signal description typo fix
2016-06-05 15:50:47 +01:00
John Rees
e75827d6ab
Signal description typo fix
2016-06-04 19:41:54 +01:00
Jason Reynolds
db0a41bedf
Set isPlaying to true if no marker (.play is not called again)
2016-06-03 17:08:07 -05:00
photonstorm
aa8e5f00db
Phaser 2.4.9 RC2.
2016-06-03 18:48:34 +01:00
photonstorm
f39dffc88e
Added Weapon Plugin to optional build task.
2016-06-03 17:26:44 +01:00
photonstorm
1a67079ae7
Phew. Added TypeScript defs for the Weapon Plugin. Don't say I never do anything for you!
2016-06-03 17:11:08 +01:00
photonstorm
61f064dfe9
Docs update.
2016-06-03 16:45:47 +01:00
Richard Davey
d81ec7fa0f
Merge pull request #2526 from drhayes/dev
...
Don't extend Phaser.Utils when doing deep copy in Phaser.Cache.getJSON.
2016-06-03 16:42:30 +01:00
Richard Davey
6c292a4607
Merge pull request #2525 from Upperfoot/dev
...
Adds missing fixedToCamera check in TilemapLayer.prototype._renderWebGL
2016-06-03 16:40:00 +01:00
photonstorm
a2d0aac9fd
Docs finished.
2016-06-03 16:38:40 +01:00
photonstorm
93b1f3eba1
Math.between will return a value between the given min
and max
values.
2016-06-03 16:18:35 +01:00
David Hayes
8317563d27
Don't extend Phaser.Utils when doing deep copy in Phaser.Cache.getJSON.
2016-06-03 10:16:07 -05:00
Upperfoot
57e8a35226
Adds missing fixedToCamera check in Phaser.TilemapLayer.prototype._renderWebGL e4ea011353
2016-06-03 16:11:39 +01:00
photonstorm
ee6f277b31
PluginManager.remove has a new argument destroy
(defaults to true
) which will let you optionally called the destroy
method of the Plugin being removed.
2016-06-03 15:52:17 +01:00
photonstorm
c73ccfbddb
Lots more docs updates.
2016-06-03 15:51:06 +01:00
photonstorm
d2269c362d
Docs update.
2016-06-03 15:20:11 +01:00
photonstorm
0da7cf5ffd
There are a bunch of new Phaser consts available to help with setting the angle of a Game Object. They are Phaser.ANGLE_UP
, ANGLE_DOWN
, ANGLE_LEFT
, ANGLE_RIGHT
, ANGLE_NORTH_EAST
, ANGLE_NORTH_WEST
, ANGLE_SOUTH_EAST
and ANGLE_SOUTH_WEST
.
2016-06-03 15:19:18 +01:00
photonstorm
96711f4db9
Added the Weapon Plugin and worked lots on its docs.
2016-06-03 15:09:43 +01:00
Richard Davey
7ec02f79e4
Merge pull request #2520 from seanirby/patch-1
...
Update docstring for TimerEvent
2016-06-03 13:15:43 +01:00
photonstorm
0a5b2673ff
JSHint fixes re: #2522
2016-06-03 13:14:59 +01:00
photonstorm
9ae43757b9
Group.removeAll has a new argument destroyTexture
which allows you to optionally destroy the BaseTexture of each child, as it is removed from the Group (thanks @stoneman1 #2487 )
2016-06-03 13:11:03 +01:00
photonstorm
ae5be7ac92
Merging in the new Weapon Plugin.
2016-06-03 13:00:45 +01:00
photonstorm
84c60d4e87
Within RequestAnimationFrame both updateRAF
and updateSetTimeout
now only call game.update
if isRunning
is true. This should avoid asynchronous Game destroy errors under environments like Angular (thanks @flogvit #2521 )
2016-06-03 13:00:45 +01:00
Richard Davey
05ca827c2b
Merge pull request #2522 from Upperfoot/master
...
Fixing tileMap collision when tileMapLayer is set to a position other than 0,0
2016-06-03 12:45:37 +01:00
photonstorm
e4ea011353
TilemapLayer now adheres to fixedToCamera should it be disabled #2482
2016-06-03 12:13:01 +01:00