Commit graph

487 commits

Author SHA1 Message Date
photonstorm
78aa24f04b Emitter.setScale now allows you to scale the x and y axis of the particles independently. 2014-04-10 05:18:06 +01:00
photonstorm
c8ca3d1809 Emitter now calls the Phaser.Particle.onEmit function, which is left empty for you to override and add in custom behaviours. 2014-04-10 01:37:10 +01:00
photonstorm
95b0532f59 Emitter.setScale has a new 'rate' parameter which allows particles to change in scale over time, using any Easing value or timescale.
Emitter.setAlpha has a new 'rate' parameter which allows particles to change alpha over time, using any Easing value or timescale.
Emitter.bringToTop and Emitter.sendToBack are booleans that let you optionally set the display order of the Particle when emitted.
2014-04-10 01:36:05 +01:00
photonstorm
770ced8ac1 Group.customSort allows you to sort the Group children based on your own sort function. 2014-04-10 00:56:53 +01:00
photonstorm
be52515ed4 PluginManager parent parameter removed as it's redundant. Also most core functions tidied up and jsdocs fixed. 2014-04-09 16:12:25 +01:00
photonstorm
50981fd729 Emitter now has minParticleAlpha and maxParticleAlpha values for setting a random alpha on emitted particles.
Emitter.particleAnchor allows you to control the anchor of emitted Particles. Defaults to 0.5 (same as before) but now under your control.
Emitter now emits Phaser.Particle objects instead of Phaser.Sprites, which can be extended as required.
Emitter has had various local properties removed that were already declared in Phaser.Group which it extends.
2014-04-09 14:29:23 +01:00
photonstorm
73d0414672 Grunt update to dev dependencies (thanks @xtian, #695) 2014-04-09 12:23:17 +01:00
photonstorm
b9cb2417b6 Group.removeBetween now properly iterates through the children. 2014-04-09 03:19:36 +01:00
photonstorm
01ccbd97c0 Key.enabled boolean allows you to toggle if a Key processes its update method or dispatches any events without deleting and re-creating it. 2014-04-09 02:29:41 +01:00
photonstorm
e764be430e Emitter.minParticleScale and maxParticleScale wasn't resetting the Body size correctly. 2014-04-09 00:59:53 +01:00
photonstorm
8fc2a465cd New Phaser package, small docs updates and preparing P2.World for new bounds code and v0.5.0 migration. 2014-04-08 03:31:13 +01:00
photonstorm
01eec6cef5 Keyboard.stop nulls the function references after removing the event listeners (thanks @bmceldowney, #691) 2014-04-07 12:29:26 +01:00
photonstorm
bf32590cfe Fixed a few jsdoc errors. 2014-04-07 12:29:26 +01:00
photonstorm
38d722c1e5 Tilemap.removeTile(x, y, layer) lets you remove the tile at the given coordinates and updates the collision data.
Tilemap.removeTileWorldXY lets you remove the tile at the given pixel value coordinates and updates the collision data.
If you pass `null` to Tilemap.putTile as the tile parameter it will pass the call over to Tilemap.removeTile.
2014-04-01 13:36:42 +01:00
photonstorm
61429d8467 StateManager.restart allows you to quickly restart the *current* state, optionally clearing the world and cache. 2014-04-01 11:25:04 +01:00
photonstorm
a4ed94e039 Key.reset now clears any callbacks associated with the onDown and onUp events and nulls the onHoldCallback if set. Key.reset is called by Keyboard.reset when changing state. 2014-04-01 04:41:43 +01:00
photonstorm
439cefd481 ArcadePhysics.Body.hitTest(x, y) will return a boolean based on if the given world coordinate are within the Body or not.
Fixed jsdoc method tags in Body.
2014-04-01 03:54:20 +01:00
photonstorm
03b80887f2 SoundManager.removeByKey(key) will remove all sounds from the SoundManager that have a key matching the given value. 2014-04-01 03:42:30 +01:00
photonstorm
3728f25d68 SoundManager.remove(sound) now lets you remove a sound from the SoundManager, destroying it in the process.
Sound.destroy will remove a sound and all local references it holds, optionally removing itself from the SoundManager as well.
2014-04-01 03:38:13 +01:00
photonstorm
1f32ef721d The Phaser Gruntfile is now split up into option tasks (thanks @xtian, #638) 2014-04-01 01:47:42 +01:00
photonstorm
5ed79dfefe The Phaser jshint process is now running on Travis (thanks @xtian, #656) 2014-04-01 01:24:49 +01:00
photonstorm
5559fea0f8 The State.update function (and thus the update of any sub-classed Sprites or other objects) is now called before Stage, Tweens, Sound, Input, etc (#662) 2014-04-01 01:01:15 +01:00
photonstorm
0198a77fe6 Phaser.Point.centroid static function added to calculate the centroid or midpoint of an array of points (thanks @lewster32, #675) 2014-04-01 00:42:13 +01:00
photonstorm
e3f1c7b21c Added Pointer.positionUp which records the last point at which the pointer left the screen / was raised (thanks @Cryszon ,#676) 2014-04-01 00:40:26 +01:00
photonstorm
3f8911d95f SoundManager.boot will check to see if the AudioContext was created before carrying on (thanks @keyle, fix #669) 2014-03-31 11:22:44 +01:00
photonstorm
16853d0e82 Updated to Pixi 1.5.2 release. 2014-03-31 11:04:02 +01:00
photonstorm
686706173a Timers can now have a start delay value (thanks @georgiee, #660) 2014-03-31 10:49:53 +01:00
photonstorm
1a92f5b7d0 If you inputEnable = false a gameobject you couldn't re-enable it again using inputEnable = true, only directly via the handler (thanks @nickrall, fix #673)
Updated the PhysicsEditor plugin to maintain position, radius, mask bits, category bits and sensor flags (thanks @georgiee, #674)
2014-03-31 10:43:43 +01:00
photonstorm
b01ad969ab Updated tutorial file 2014-03-30 20:52:27 +01:00
photonstorm
76c0913b37 Setting up for 2.0.3 development. 2014-03-28 02:18:58 +00:00
photonstorm
5b73bb21bb Sprite would glitch if it had an ArcadePhysics Body that was re-positioned out of loop.
Sprite would "fly off" if it had an ArcadePhysics Body that was re-positioned during an input handler.
Newly generated docs
2014-03-28 01:42:49 +00:00
Richard Davey
06c953a293 Merge pull request #647 from xtian/grunt-jshint
Run jshint as part of build process and fix jshint errors
2014-03-26 15:46:35 +00:00
photonstorm
fc0e239719 ArcadePhysics.Body preUpdate has been modified to stop Sprites with non-1 scaling from gaining delta and moving off the screen (fix #644).
Lots of ArcadePhysics.World methods have been marked as private where they shouldn't be called directly (separateX, etc)
2014-03-26 10:48:30 +00:00
Christian Wesselhoeft
12c5a1b534 Run jshint as part of build process. 2014-03-25 14:56:00 -07:00
photonstorm
344ab46d78 Line.fromSprite now sets "fromCenter" to false by default as Sprite.center is deprecated in 2.x. Documentation and Examples updated to reflect this. 2014-03-25 12:44:20 +00:00
photonstorm
6483b61db7 Tween.generateData would enter an eternal loop if the total resulted in a float. Now wrapped in Math.floor. 2014-03-25 03:08:51 +00:00
photonstorm
6651f6c394 Tutorial updated for Phaser 2 2014-03-24 23:38:52 +00:00
photonstorm
65e1ae51d8 Fixed small typos in the README. 2014-03-24 12:21:21 +00:00
photonstorm
622957c9b0 Timer objects incorrectly set the first tick value on events if you added the events prior to starting them. 2014-03-24 02:25:35 +00:00
photonstorm
e1c98ba617 You can now create multiple blank layers in a Tilemap. 2014-03-23 23:58:01 +00:00
photonstorm
0c156ccd90 Fixed some md issues in Contributing and Readme.
Fixed game reference in Emitter.
2014-03-23 12:07:55 +00:00
photonstorm
21c0be4d02 BitmapDatas when used as Game Object textures in WebGL now update themselves properly.
Timer.ms now correctly reports the ms time even if the Timer has been paused (thanks Nambew, fix #624)
2014-03-21 18:37:54 +00:00
photonstorm
0fa54b0b24 TileSprites now emit outOfBounds and enterBounds events accordingly.
TileSprites working with physics bodies again.
2014-03-21 18:04:24 +00:00
photonstorm
9c8f01cd7f The volume given in Sound.play now over-rides that set in Sound.addMarker if specified (fix #623) 2014-03-21 15:43:59 +00:00
photonstorm
0fca997d43 P2.Body.loadPolygon no longer modifies the Cache array (fix #613) 2014-03-21 13:46:35 +00:00
photonstorm
768bbaaec6 README updates. 2014-03-21 12:34:26 +00:00
photonstorm
b9fcda73ca ArcadePhysics.World.seperate will now check gravity totals to determine separation order. You can set World.forceX to true to always separate on X first and skip this check. 2014-03-21 11:22:56 +00:00
photonstorm
111164e221 If no seed was given in the Game config object, the RandomDataGenerator wouldn't be started (thank tylerjhutchison fix #619) 2014-03-21 11:22:56 +00:00
photonstorm
634b1d1093 Emitter.friction property removed and replaced with Emitter.particleDrag, which is now correctly applied.
ArcadePhysics.Body.reset incorrectly set the Body.rotation to Sprite.rotation instead of angle.
Emitter.emitParticle resets the rotation on the particle to zero before emitting it.
Lots of fixes to the TypeScript definitions file (thanks as always to clark-stevenson for his tireless work on these)
Emitters now bring the particle they are about to emit to the top of the Group before doing so. Avoids particles hidden behind others.
ArcadePhysics.Body.setSize corrected to take the parameters as positive, not negative values.
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608)
Emitter.particleClass can now be set to any object that extends Phaser.Sprite, which will be emitted instead of a regular Sprite.
2014-03-20 03:48:54 +00:00
photonstorm
684ee9c064 ArcadePhysics.Body has a deltaMax object, which allows you to cap the delta applied to the position to +- this value.
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608)
2014-03-20 00:20:02 +00:00