Commit graph

2216 commits

Author SHA1 Message Date
Stephan de Souza
7fb555e70e Adds Heal Method to Phaser.Components.Health
Ideal when used in games with health packs, bonus items, or healing sprites.

In fact: Doing a negative damage causes the same effect, but as a new method is better for documentation.
2015-05-13 16:55:17 -03:00
photonstorm
8233b0a079 Phaser 2.3.0. 2015-03-26 02:37:31 +00:00
photonstorm
eb235197e9 Phaser 2.3 Release Candidate 3. 2015-03-25 16:17:53 +00:00
photonstorm
79ace60997 Added guard around the xhr onload try / catch block, so it doesn't incorrectly report errors as being from the Loader when they may have been throw by the create method. 2015-03-25 16:13:52 +00:00
photonstorm
c1366c2f4f Arc comment. 2015-03-25 16:13:21 +00:00
photonstorm
93dc67be71 Graphics.drawArc would fail to draw any subsequent arcs if you set beginFill on it after drawing the first arc.
Graphics.drawArc would only move to the center position of the first arc created and ignore any subsequent arcs.
Graphics.drawArc now correctly renders multiple arcs across both WebGL and Canvas. You no longer need to specifically call moveTo to move into the correct place to draw the arc.
Graphics.drawArc now bails out if the startAngle = the endAngle and/or the sweep is invalid *before* adjusting any points.
Graphics.drawArc now correctly handles the fill on the CanvasRenderer if the arc is a subsequent arc and no line style is set.
2015-03-25 13:00:08 +00:00
photonstorm
d45a7bae8e Fixed constructor. 2015-03-25 12:59:41 +00:00
photonstorm
e7400be625 Formatting updates. 2015-03-25 12:59:31 +00:00
photonstorm
b1cdb358bb Merging in fixes from Pixi 3. 2015-03-25 11:04:58 +00:00
photonstorm
17b2eafbf3 Split GraphicsData to its own file. 2015-03-25 11:04:48 +00:00
photonstorm
93ed950f89 Small geom tidy-up. 2015-03-25 11:04:31 +00:00
photonstorm
f4d55b7785 When an Emitter is destroyed via Emitter.destroy it now removes itself from the Phaser Particle Manager, freeing it up for garbage collection and stopping it from being processed. 2015-03-25 05:07:39 +00:00
photonstorm
aa13ec0165 Animation.play wouldn't correctly set the play state on the Game Objects AnimationManager causing the animation to fail to start (calling AnimationManager.play did work however), now they're both consistently working. 2015-03-25 03:59:36 +00:00
photonstorm
244372384e When an Animation completes playback and isn't set to loop it would change the currentFrame property to be the first frame in the set after the onComplete callback had fired. This meant if you set a Sprite to a new frame within an Animation onComplete callback then your change would have been overwritten by the animation itself. This is now no longer the case. 2015-03-24 23:17:13 +00:00
photonstorm
83adc51698 Fixed the FixedToCamera :) 2015-03-24 21:35:09 +00:00
photonstorm
c4b83a1394 Phaser 2.3 Release Candidate 1. 2015-03-24 16:05:52 +00:00
photonstorm
96e313e768 If you paused a Sound object that is using audio markers and then resumed it, it wouldn't correctly calculate the resume duration - causing the sound to sometimes play into the marker that followed it (thanks @AnderbergE #1669) 2015-03-24 14:43:35 +00:00
photonstorm
7e19f45350 When the Game first boots it will now call window.focus(). This allows keyboard events to work properly in IE when the game is running inside an iframe. You can stop this from happening by setting window.PhaserGlobal.stopFocus = true (thanks @webholics #1681) 2015-03-24 13:27:27 +00:00
photonstorm
ebdb6d028f The Physics Manager now has a new reset method which will reset the active physics systems. This is called automatically on a State swap (thanks @englercj #1691) 2015-03-24 10:21:12 +00:00
photonstorm
7aa4d0ad0d When a State is started and linked to Phaser it has a new property created on it: key, which is the string identifier used by the State. 2015-03-24 10:21:03 +00:00
photonstorm
12fc424305 Huge amount of jsdoc updates. 2015-03-23 23:46:09 +00:00
photonstorm
08c9513f98 Improving the Component documentation. 2015-03-23 19:56:23 +00:00
photonstorm
85c8f60d7c Removed 'global' component arrays. 2015-03-23 19:19:07 +00:00
photonstorm
b7b622a556 Text style has a new optional property: backgroundColor which is a Canvas fill style that is set behind all Text in the Text object. It allows you to set a background color without having to use an additional Graphics object.
Text.lineSpacing can now accept negative values without cutting the bottom of the Text object off. The value can never be less than the height of a single line of text.

Text.lineSpacing is no longer applied to the first line of Text, which prevents text from being cut off further down the Text object.
2015-03-23 16:12:23 +00:00
photonstorm
7010883bc3 Tidying up. 2015-03-23 15:07:09 +00:00
photonstorm
77eaa7e707 Optimised World.collideHandler and added SORT_NONE option. 2015-03-23 15:05:57 +00:00
photonstorm
b07ce89236 sourceWidth / Height now only set from the texture if the object has a texture. 2015-03-23 15:05:39 +00:00
photonstorm
1486e166bd Added physicsType property. 2015-03-23 15:04:27 +00:00
photonstorm
55048a4b25 BitmapText objects now have an anchor property. This works in a similar way to Sprite.anchor except that it offsets the position of each letter of the BitmapText by the given amount, based on the overall BitmapText width - whereas Sprite.anchor offsets the position the texture is drawn at. 2015-03-23 15:03:53 +00:00
photonstorm
506ff8843e Fixed incorrect use of this.response which broke Binary files with callbacks. Should be all of them caught now - ProTracker example now works again as a result too. 2015-03-23 10:52:43 +00:00
photonstorm
35a9bdcfc9 Fixed loading of physics json data (old responseText reference) 2015-03-23 10:46:38 +00:00
photonstorm
ba052389a3 New version of p2.js merged for testing. 2015-03-23 10:11:49 +00:00
photonstorm
3f30a3d0d2 jsdocs updates. 2015-03-23 10:11:39 +00:00
photonstorm
ca752cc59c jsdoc updates. 2015-03-23 08:13:59 +00:00
photonstorm
a190823dad jsdoc fix. 2015-03-23 08:13:59 +00:00
photonstorm
4e3d189678 Updated Pixi version. 2015-03-23 08:13:59 +00:00
Richard Davey
ae72107de8 Merge pull request #1685 from pnstickne/wip-1679
Animation - guard around destroy
2015-03-23 07:53:59 +00:00
Richard Davey
a10a18277a Merge pull request #1686 from englercj/dev
Add debug drawing for p2 capsule shape
2015-03-23 07:47:30 +00:00
Chad Engler
f5af981da3 fix missing semicolon 2015-03-22 21:28:27 -07:00
Chad Engler
97410f8907 add debug drawing for p2 capsule shape 2015-03-22 19:45:18 -07:00
Paul
6225bb0e94 Animation - guard around destroy
- Allows sprites (and/or the animation) to be destroyed from within
  the onUpdate, onLoop, or onComplete events
2015-03-22 17:01:37 -07:00
photonstorm
cb9ef4f12e Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions (#1561 #1518) 2015-03-19 01:54:14 +00:00
photonstorm
b13acdb23b TilingSprite.destroy fixed if TilingSprite hasn't ever been rendered (#1663) 2015-03-19 01:39:39 +00:00
photonstorm
5a9b509b44 ArraySet.removeAll allows you to remove all members of an ArraySet and optionally call destroy on them as well.
GameObject.input.dragStartPoint now stores the coordinates the object was at when the drag started. This value is populated when the drag starts. It can be used to return an object to its pre-drag position, for example if it was dropped in an invalid place in-game.
2015-03-19 00:51:13 +00:00
breakosaur
bb600b4319 Fixed a few documentation typos. 2015-03-18 21:07:36 +00:00
Richard Davey
358e0a6675 Merge pull request #1674 from englercj/dev
Fix debug drawing for p2 physics bodies
2015-03-18 19:21:59 +00:00
photonstorm
165e5935c2 JSDoc fixes. 2015-03-18 19:14:58 +00:00
Chad Engler
0b3850cc0c Fix debug drawing for p2 physics bodies 2015-03-18 01:19:32 -07:00
Paul
dcc83ec793 Tilemap renderer - context save/restore
- Added context save/restore; the secondary issue when the canvas
  is copied from later, and if any alpha is applied
2015-03-16 22:05:46 -07:00
Paul
54dba67f50 Tilemap rendering sets initial state better
- #1666 - previous alpha state could bleed through.
  Now the initial alpha and composite modes are set explicitly.
2015-03-16 21:35:39 -07:00