Commit graph

677 commits

Author SHA1 Message Date
photonstorm
2c421d27ce GameObjectFactory.spriteBatch now lets you specify null as a parameter for the parent and automatically adds the batch to game.world as a result. Also fixed jsdocs issues (@petarov #1000) 2014-07-14 12:56:05 +01:00
photonstorm
5bc482685b Renaming the release :) #1004 2014-07-14 12:08:46 +01:00
photonstorm
bc9e5804b2 Updated docs. 2014-07-11 18:02:47 +01:00
photonstorm
0353ee12be Reverting to a 2.0.7 release to fix the issues with Image / RetroText / Buttons. 2014-07-11 16:30:25 +01:00
photonstorm
74679922d1 Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, #995) 2014-07-11 11:52:48 +01:00
photonstorm
d7bed24a27 Preparing for 2.1.0 build. 2014-07-10 23:14:29 +01:00
photonstorm
8421cfc400 Final readme updates. 2014-07-10 20:39:17 +01:00
photonstorm
d0727b9c04 ReadMe update. 2014-07-10 20:39:13 +01:00
photonstorm
d11d8051b1 You can now prevent the Debug class from being created or booted by using the Game configuration setting: enableDebug. By default it is true, set to false to prevent the class from being created. Please note you are responsible for checking if this class exists before calling it, but you can do that via if (game.debug) { ... } (request #984) 2014-07-10 10:46:18 +01:00
photonstorm
a182598c65 Using a Game configuration object you can now specify the value of the preserveDrawingBuffer flag for the WebGL renderer. By default this is disabled for performance reasons. But if you need to be able to take screen shots of your WebGL games using toDataUrl on the game canvas then you'll need to set this to true (#987) 2014-07-10 10:46:18 +01:00
photonstorm
494c33a9f4 Rectangle.randomX will return a random value located within the horizontal bounds of the Rectangle.
Rectangle.randomY will return a random value located within the vertical bounds of the Rectangle.
2014-07-09 11:34:18 +01:00
photonstorm
003403c832 Color.getWebRGB will now accept either an Object or numeric color value. 2014-07-09 11:15:24 +01:00
photonstorm
ca8c6e16e9 README updates. 2014-07-08 12:59:36 +01:00
photonstorm
0b2bea3564 Removed hasOwnProperty check from Tween.from because it breaks on extended or inherited Game Objects. 2014-07-08 12:59:36 +01:00
photonstorm
2a106473b4 Added more detail to the Tween docs. 2014-07-08 12:59:36 +01:00
photonstorm
2d676b00b4 Working through crop issues. 2014-07-08 12:59:36 +01:00
photonstorm
77d5be1d8e When adding a new Animation to a Sprite it would incorrectly reset the current Sprite frame to the first frame of the animation sequence, it is now left un-touched until you call play on the animation. 2014-07-08 12:59:35 +01:00
photonstorm
14109aeeb1 Animation.next will advance to the next frame in the animation, even if it's not currently playing. You can optionally define the number of frames to advance, but the default is 1. This is also aliased from the AnimationManager, so you can do Sprite.animations.next().
Animation.previous will rewind to the previous frame in the animation, even if it's not currently playing. You can optionally define the number of frames to rewind, but the default is 1. This is also aliased from the AnimationManager, so you can do `Sprite.animations.previous()`.
2014-07-03 16:23:36 +01:00
photonstorm
7c624f409f Updated console.log and README. 2014-07-03 10:50:26 +01:00
photonstorm
177d51f238 Signal.removeAll now has a new context parameter. If specified only listeners matching the given context are removed (thanks @lucbloom for the idea, #880) 2014-07-03 02:22:11 +01:00
photonstorm
92dbabb2df Camera.updateTarget has had a make-over and now is a lot smoother under certain conditions (thanks @tjkopena, fix #966) 2014-07-03 02:09:53 +01:00
photonstorm
8c41f6cc10 Game.onBlur and Game.onFocus events are now dispatched regardless if Stage.disableVisibilityChange is true or false, so you can respond to these events without your game automatically pausing or resuming (#911) 2014-07-02 14:57:28 +01:00
photonstorm
2916f0413f Group.bringToTop (and consequently Sprite.bringToTop) no longer removes the child from the InputManager if enabled (thanks @BinaryMoon, fix #928)
Group.sendToBack (and consequently Sprite.sendToBack) no longer removes the child from the InputManager if enabled.
Group.add has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.addAt has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.remove has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onRemovedFromGroup` event.
Group.removeBetween has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Group.removeAll has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Internal child movements in Group (such as bringToTop) now uses the new `silent` parameter to avoid the child emitting incorrect Group addition and deletion events.
2014-07-02 14:04:14 +01:00
photonstorm
2cef655ed6 Calling Tween.stop from inside a Tween update callback would still cause the tween onComplete event to fire (thanks @eguneys, #924) 2014-07-02 05:47:38 +01:00
photonstorm
5ee9245acf Rectangle.right when set would set the new width to be Rectangle.x + the value given. However the value given should be a new Right coordinate, so the width calculation has been adjusted to compensate (thanks @cryptonomicon, #849) 2014-07-02 05:37:12 +01:00
photonstorm
58fc73348c The StateManager has a preRenderCallback option, which checks for a preRender function existing on the State, but it was never called. Have decided to add this in, so the core Game loop now calls state.preRender right before the renderer runs (thanks @AnderbergE #869) 2014-07-02 05:32:40 +01:00
photonstorm
757136bf4f Device.mobileSafari was no longer detecting Mobile Safari, now fixed (thanks @Zammy, #927) 2014-07-01 19:19:49 +01:00
photonstorm
79bd7c400b Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, #932) 2014-07-01 16:57:55 +01:00
photonstorm
faa9af5539 readme updates 2014-07-01 16:19:20 +01:00
photonstorm
d2fc42520b stopFullScreen has been changed to run against document instead of the canvas since the cancelFullScreen method is created on the document (thanks @j0hnskot, #863) 2014-07-01 15:46:32 +01:00
photonstorm
8b9aec320b Readme updates. 2014-07-01 15:46:32 +01:00
photonstorm
8c11ec1037 Updated readme. 2014-07-01 15:08:12 +01:00
photonstorm
181fd1ae56 Merged Pixi 1.5.4 with Phaser - all of the lovely new Pixi features are in, like complex Graphics objects and masking. 2014-07-01 15:03:46 +01:00
photonstorm
3d80568e4c Loader.isLoading is set to false if the filelist size is zero. 2014-06-30 09:24:25 +01:00
photonstorm
692ca928f0 Updated docs. 2014-06-29 21:19:37 +01:00
photonstorm
3ebb13c4b0 PR updates 2014-06-24 00:10:54 +01:00
photonstorm
907ba55478 Huge number of gamepad updates to get it working properly on Chrome again. Firefox debugging tomorrow. 2014-06-11 04:25:30 +01:00
photonstorm
0587d944b3 Added PlayStation 3 controller button mappings to Phaser.Gamepad (thanks @wayfu #887) 2014-06-11 00:25:58 +01:00
photonstorm
50e47d89ee ArcadePhysics.Body.setSize if you set offset x/y values previously and then passed zero values they would be ignored (thanks @casensiom fix #889) 2014-06-11 00:21:04 +01:00
photonstorm
e923e230e0 TilemapLayers can now be used with an unbounded camera (a camera that can move beyond the world boundaries). Currently, when an unbounded camera moves outside of the world, tilemaps start acting weird because they only render themselves strictly within the world limits. With this change, the tilemap will continue scrolling and show empty space beyond its edge (thanks @jotson #851)
TilemapLayer.wrap property - if true the map is rendered as if it is on the surface of a toroid (donut) instead of a plane. This allows for games that seamlessly scroll from one edge to the opposite edge of the world without noticing the transition. Note that the World size must match the Map size (thanks @jotson #851)
2014-06-11 00:15:02 +01:00
photonstorm
78c4e62cfe BitmapData.getPixel fix for pixels with zero red value (thanks @lstor fix #894)
If you call ArcadePhysics.collide on a Sprite vs. a Tilemap and provide a custom processCallback, the result was being ignored and the sprite was being separated regardless (thanks @aivins fix #891 #890)
2014-06-11 00:02:06 +01:00
photonstorm
b979243a8d Removed the cacheKey parameters from the AnimationParser methods as they're no longer used. 2014-06-10 23:50:12 +01:00
photonstorm
7c7d9153e6 Sprite.crop (and Image.crop) has been completely overhauled. You can now crop animated sprites (sprite sheet and texture atlas), you can define the x/y crop offset and the crop rectangle is exposed in the Sprite.cropRect property.
Sprite.updateCrop is available if you wish to update an externally referenced crop rectangle.
Sprites and Images now have their own textures objects, they are no longer references to those stored in the global Pixi.TextureCache. This allows you to redefine the texture frame dynamically without messing up any other Sprites in your game, such as via cropping. They still share global Base Textures, so image references are kept to a minimum.
Sprite.resetFrame will revert the Sprites texture frame back to its defaults dimensions. This is called when you call Sprite.crop with no rectangle, to reset the crop effect, but can be userful in other situations so we've left it as a public method.
2014-06-10 23:37:33 +01:00
photonstorm
6d10be6baa When creating a Sprite or Image using a texture atlas it would set the frame twice, once in loadTexture and once when the initial frame is set. This has been reduced down to just a single setting now. 2014-06-10 11:21:07 +01:00
photonstorm
ee5f6457c8 Swapped to using escaped Unicode characters for the console output. 2014-06-09 16:15:41 +01:00
photonstorm
9aa10f7521 Sound.pause will no longer fire a Sound.onStop signal, and the pause values are set before the onPause signal is dispatched (thanks @AnderbergE, fix #868) 2014-06-05 02:55:20 +01:00
photonstorm
369e2cc2d0 Sound.destroy(true) would call remove on the SoundManager, which in turn would throw a TypeError as it tried to remove the sound events twice (thanks @AnderbergE, fix #874) 2014-06-05 02:50:53 +01:00
photonstorm
1c9e23f535 Emitter.start has a new parameter: forceQuantity which will force the quantity of a flow of particles to be the given value (request #853)
Emitter.explode is a new short-cut for exploding a fixed quantity of particles at once.
Emitter.flow is a new short-cut for creating a flow of particles based on the given frequency.
2014-06-02 01:15:58 +01:00
photonstorm
12252944fa Time.add allows you to add an existing Phaser.Timer to the timer pool (request #864) 2014-06-02 00:54:42 +01:00
photonstorm
917c7491cd Canvas.create has deprecated the noCocoon parameter as it's no longer required. The parameter is still in the signature, but no longer used in the method. 2014-05-30 02:03:07 +01:00