Commit graph

186 commits

Author SHA1 Message Date
photonstorm
39add47ac3 enableBody added to Group constructor. Also: game.add.physicsGroup(Phaser.Physics.ARCADE) is a thing :) 2014-03-13 11:45:55 +00:00
photonstorm
aa6b1821bd Get First Dead example. 2014-03-13 10:14:06 +00:00
photonstorm
94448d2497 P2 postBroadphase example and handler done. Group.enableBodyDebug added. Sprites no longer remove bodies from the world if exists = false, instead they set safeDestroy to true, which removes the body on the next preUpdate, to avoid mid-step destruction issues. 2014-03-13 07:29:23 +00:00
photonstorm
1966bfc0f8 Added in Game.focusLoss and focusGain methods and onBlur and onFocus signals to listen for. Made small time related fix and tested on iOS6 and iOS7 home screen button + lock button and all working fine. 2014-03-12 21:19:00 +00:00
photonstorm
84741f065f New P2 examples. And fixed Camera.atLimit value. 2014-03-12 16:33:53 +00:00
photonstorm
abf26df741 New P2 examples and fixed Body debug assignment parameter. 2014-03-12 06:25:29 +00:00
photonstorm
6ef9e30753 Added z property to remaining game objects and updated TypeScript defs. 2014-03-10 23:16:49 +00:00
photonstorm
53797171a3 Fixed Group.sort. Added z-depth property to all core game objects. Fixed P2 const overwrite. 2014-03-10 23:01:10 +00:00
photonstorm
b4cb281f1c Renamed Phaser.Physics.P2 const to Phaser.Physics.P2JS to avoid issue #540 2014-03-10 22:15:03 +00:00
photonstorm
85d5fdfb2f Sorted out orientationImage in ScaleManager, throwing a preUpdate error (fix #534)
Tightened up the currentFrame allocation in AnimationManager.
2014-03-10 19:06:16 +00:00
photonstorm
9f997daa46 Lots of examples fixes and put Group.sort back in. 2014-03-10 14:33:18 +00:00
photonstorm
8fff38618d Tidied up the Examples, fixed Arcade Physics Body, added Body enable support to Group and fixed QuadTree. 2014-03-10 03:06:28 +00:00
photonstorm
8c2502d37d Group.xy(index, x, y) allows you to set the x and y coordinates of a Group child at the given index.
Group.reverse() reverses the display order of all children in the Group.
New labs demo.
Fixed some Easing docs issues.
2014-03-04 01:27:57 +00:00
photonstorm
67ad898294 Tween.generateData(frameRate) allows you to generate tween data into an array, which can then be used however you wish (see new examples)
Added new Retro Font examples.
2014-03-03 22:43:35 +00:00
photonstorm
8dcfef8db0 Updated to latest Pixi build (can do away with our own local patch now).
Group.sendToBottom(child) is the handy opposite of Group.bringToTop()
Group.moveUp(child) will move a child up the display list, swapping with the child above it.
Group.moveDown(child) will move a child down the display list, swapping with the child below it.
2014-02-28 18:55:07 +00:00
photonstorm
7e12075be1 Buttons are now cleanly destroyed if part of a Group without leaving their InputHandler running.
You can now safely destroy a Group and the 'destroyChildren' boolean will propogate fully down the display list.
Calling destroy on an already destroyed object would throw a run-time error. Now checked for and aborted.
Calling destroy while in an Input Event callback now works for either the parent Group or the calling object itself.
In Group.destroy the default for 'destroyChildren' was false. It's now `true` as this is a far more likely requirement when destroying a Group.
All GameObjects now have a 'destroyChildren' boolean as a parameter to their destroy method. It's default is true and the value propogates down its children.
2014-02-27 20:05:16 +00:00
photonstorm
5ab104ad4b Loader.script now has callback (and callbackContext) parameters, so you can specify a function to run once the JS has been injected into the body. 2014-02-26 02:45:06 +00:00
photonstorm
c53a06849e Stop Group.callAll splitting empty strings. 2014-02-25 05:20:19 +00:00
photonstorm
5f6fc9db05 When adding a Group if the parent value is null the Group won't be added to the World, so it's up to you to add it when ready. If parent is undefined it's added to World. 2014-02-21 12:33:15 +00:00
Georgios Kaleadis
b2303c64a3 endless loop when in Phaser.Group when destroy children fixed (use parent not group) 2014-02-20 13:26:10 +01:00
photonstorm
812de7d994 Fix typos in Phaser.Group#forEachExists for docs #447 2014-02-19 15:06:22 +00:00
photonstorm
e5812710cc Added Spring class. Fixed reason why World wasn't pre and post updating (Stage didn't have an exists property). 2014-02-15 02:19:37 +00:00
photonstorm
e5e643b103 fixedToCamera now works across all display objects. When enabled it will fix at its current x/y coordinate, but can be changed via cameraOffset.
fixedToCamrea now works for Groups as well :) You can fix a Group to the camera and it will influence its children.
Also fixed the issue with World.preUpdate/postUpdate not being called and various small documentation issues.
2014-02-15 01:27:42 +00:00
photonstorm
3e99391cbf Updated all Game Objects so they all have preUpdate, update and postUpdate functions (even if empty). Updated World so when it iterates through them all it no longer checks if those functions are present before calling them. Was wasting a lot of time doing that before. 2014-02-14 01:09:52 +00:00
photonstorm
bdb8908fee Groups now update their children across preUpdate, update and postUpdate.
Sprite.exists = false removes Body from world.
2014-02-13 12:26:39 +00:00
photonstorm
f6113ac6c4 Physics World events added.
Group has new 'addToWorld' parameter, which fulfills the same function as the old useStage.
Stage now extends PIXI.Stage rather than owns one.
2014-02-12 19:45:09 +00:00
photonstorm
4ed20e0f77 Removed all intances of Sprite.group from Group and replaced with the already existing parent property. 2014-02-06 13:15:45 +00:00
photonstorm
8eae8feecc More Group fixes to the new format. Updated list of included Pixi files to remove un-needed ones. 2014-02-06 03:34:27 +00:00
photonstorm
4cfce8b4d2 Group now extends PIXI.DisplayObjectContainer, rather than owning a _container property, which makes life a whole lot easier re: nesting. 2014-02-06 02:31:36 +00:00
photonstorm
0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
photonstorm
84f0f00f49 n-way collision checks and onBeginContact and onEndContact done and working. Also fixed issue in TweenManager.removeAll. 2014-02-05 16:54:58 +00:00
photonstorm
3488880956 Sprite vs. Sprite Group Body Tests. 2014-02-03 04:09:45 +00:00
photonstorm
011d2d8e05 The way the collision process callback works has changed significantly and now works as originally intended.
The World level quadtree is no longer created, they are now built and ripped down each time you collide a Group, this helps collision accuracy.
Bodies are no longer added to a world quadtree, so have had all of their quadtree properties removed such as skipQuadtree, quadTreeIndex, etc.
QuadTree.populate - you can pass it a Group and it'll automatically insert all of the children ready for inspection.
Removed ArcadePhysics binding to the QuadTree, so it can now be used independantly of the physics system.
2014-01-14 02:43:09 +00:00
photonstorm
428e331a11 Groups can now be added to other Groups as children via group.add() and group.addAt().
Groups now have an 'alive' property, which can be useful when iterating through child groups with functions like forEachAlive.
2014-01-06 01:39:23 +00:00
photonstorm
86f6ddcbc8 Two new particle examples and a group animation example. Also fixed CocoonJS sound issue and Cache sound locked bug. 2013-12-31 03:37:11 +00:00
photonstorm
ba74bea4b4 New Group.destroy example and patched the desyrel font xml. 2013-12-30 21:36:50 +00:00
photonstorm
ce4cf531d4 Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source. 2013-12-30 16:54:00 +00:00
photonstorm
bf72b4d3b0 Tilemap.createFromObjects can now turn a bunch of Tiled objects into Sprites in one single call, and copies across all properties as well. 2013-12-22 04:27:12 +00:00
photonstorm
7917eac255 Added Matching Pairs game and updated fixed to camera example. 2013-12-16 15:16:44 +00:00
photonstorm
669570c701 Tidying up the examples and more Tilemap work. 2013-12-10 12:23:42 +00:00
photonstorm
1f513a333e Fixed an issue where passing null as the Group parent wouldn't set it to game.world as it should have (thanks tito100).
Continued work on the tilemap collision - again, please don't use this version if you need working tilemaps.
2013-12-06 01:07:25 +00:00
photonstorm
cd314cd03e Group.length now returns the number of children in the Group regardless of their exists/alive state, or 0 if the Group is has no children. 2013-12-05 09:14:49 +00:00
photonstorm
42c0bed502 Fixed World.scale and Group.scale. 2013-12-03 02:13:57 +00:00
photonstorm
a9a46bfbbf Lots of documentation updates and new Loader examples. 2013-11-27 16:33:49 +00:00
photonstorm
141337bed9 Heavily optimised PixiShader. 2013-11-26 05:13:56 +00:00
photonstorm
299115ca5d The entire Phaser library has been updated to match the new JSHint configuration. 2013-11-25 04:40:04 +00:00
photonstorm
13a2cc2feb Updating all files to adhere to the JSHint settings and fixing lots of documentation errors on the way. 2013-11-25 03:13:04 +00:00
photonstorm
83cacb93a0 More updates to BitmapData. 2013-11-15 20:40:55 +00:00
photonstorm
3f99b691c9 Added in a Group.sort demo, also updated the documentation and build files. 2013-11-07 06:10:15 +00:00
photonstorm
42cd8bd812 Added Group.sort, can sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :) 2013-11-07 04:31:37 +00:00
photonstorm
789f0bb0a1 Fixing up Group.sort 2013-11-06 17:43:01 +00:00
photonstorm
dfb22f1044 Tracked down an evil bug in Group.swap that caused the linked list to get corrupted in an upward (B to A) neighbour swap. 2013-11-06 16:46:21 +00:00
photonstorm
3e9777e6f4 Updated docs for 1.1.2 release. 2013-11-01 18:16:52 +00:00
photonstorm
685054eac5 Group.callAll now supports nested functions and a context, making it really powerful! 2013-11-01 17:29:57 +00:00
photonstorm
581d637663 Added Group.cursor. This points to the first item added to a Group. You can move the cursor with Group.next() and Group.previous(). 2013-11-01 02:50:00 +00:00
photonstorm
3c164b466c * Updated: event.preventDefault() has been added to all Mouse event handlers.
* Updated: Sprite.deltaX/Y removed due to non-use. prevX/Y values moved to Sprite._cache.prevX/Y.
* Updated: Due to missing extends parameter the Sprite prototype was picking up functions from classes it never meant to (Button, TilemapLayer), now fully isolated.
2013-11-01 02:07:21 +00:00
photonstorm
7e5f38d022 Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas. 2013-10-23 17:11:06 +01:00
photonstorm
275fa4641e Added Text.destroy and BitmapText.destroy. 2013-10-17 15:40:44 +01:00
photonstorm
c6bf67c392 Group.alpha exposed and instance returns added to Loader functions. 2013-10-13 20:28:06 +01:00
photonstorm
f5584bdfe5 Lots of fixes and updates to ArcadePhysics and Group, plus more examples. 2013-10-08 21:09:46 +01:00
photonstorm
1bc6ac25fa Preparing to merge new examples. 2013-10-07 22:15:28 +01:00
Richard Davey
c00bf96603 World and Camera updates nearly complete. 2013-10-04 16:51:24 +01:00
Richard Davey
e8bed83ac3 Making some major changes to Camera and World. 2013-10-04 14:41:15 +01:00
Richard Davey
852e82d0ca More docs. 2013-10-02 12:11:22 +01:00
Richard Davey
82325ecc8a Finished Group documentation. 2013-10-02 01:51:30 +01:00
Richard Davey
e5b1faace6 Preparing more documentation. 2013-10-02 01:16:40 +01:00
Richard Davey
7c7cd8b01d More docs and quick patch to stop the body.allowRotation messing things up. 2013-10-01 16:56:47 +01:00
Richard Davey
ca113b85aa More docs coming on. 2013-10-01 16:39:39 +01:00
Richard Davey
305b12d76b Adding docs. 2013-10-01 15:01:46 +01:00
Richard Davey
480d90b009 * Removed the callbackContext parameter from Group.callAll because it's no longer needed.
* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child.
* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg)
2013-10-01 02:19:08 +01:00
Richard Davey
a415e779d1 Final 1.0.5 release. 2013-09-20 13:55:33 +01:00
Richard Davey
c5fc5e3394 Fixed various issues in the TweenManager, added length property to Group and improved the build script. 2013-09-19 04:45:08 +01:00
Richard Davey
49a6ba2c02 Updated Group to fix some issues with not checking children 2013-09-15 00:14:45 +01:00
Richard Davey
7c6e6df91a State swap example done and working. 2013-09-13 05:44:04 +01:00
Richard Davey
9f687b4f8a Adding Type support for collision checks. 2013-09-12 21:54:41 +01:00
Richard Davey
336de314a1 Fixed an issue where the Tile.physicsElapsed would go insane if the game has been paused for a long time. 2013-09-12 16:18:44 +01:00
Richard Davey
dbaf7269e9 Promoted the Tilemap to a DisplayObject and vastly simplified the load process. 2013-09-12 04:24:01 +01:00
Richard Davey
f260108433 Tidying up source code for release. Also refactored World to use a Group instance, rather tha duplicate functions. 2013-09-11 13:21:07 +01:00
Richard Davey
a486bf6b4a Phaser now running on iOS. Also fixed a legacy bug where a pending sound wouldn't play once it was touch unlocked. Also fixed Input not working on WebGL contexts. Added WebGL texture updates to the Group/World swap functions. 2013-09-10 16:46:39 +01:00
Richard Davey
15fe5ed6c8 Fixed the Bring to Top bug and also fixed Group/World.swap when the child was a tail node. Also improved Group.dump significantly. Fixed Phaser.Utils namespace clash too. 2013-09-10 12:46:14 +01:00
Richard Davey
5d3fe891cd Particle Emitter in and working. Nice and fast, and a lot more flexible than before. 2013-09-10 01:26:50 +01:00
Richard Davey
30fc4099c6 Out of bounds and Sprite events hooked up 2013-09-09 13:29:33 +01:00
Richard Davey
78598ae54a Implemented my own LinkedList class to make the new Input Handler easier to work with. And also just generally useful to have too. 2013-09-08 11:24:41 +01:00
Richard Davey
eb7af3d2a2 Group nearly done. Sprite.anchor appears to be broken though, must fix. 2013-09-06 20:20:58 +01:00
Richard Davey
822a2df289 Lots of work on Group and also resolved the issue of the core game loop structure not being quite right. 2013-09-06 15:00:05 +01:00
Richard Davey
0c97e8e151 Starting work on Group. 2013-09-05 21:07:44 +01:00