mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Update Migration Guide.md
Maybe this will save someone else the 30 minute debug
This commit is contained in:
parent
1746afe477
commit
edef6227e6
1 changed files with 2 additions and 1 deletions
|
@ -53,6 +53,7 @@ Changes to Phaser.Sprite
|
|||
* If you set Sprite.exists to true it will also set Sprite.visible to true and add its body back into the physics world (if it has one).
|
||||
* Phaser.Animation.frame now returns the frame of the current animation, rather than the global frame from the sprite sheet / atlas.
|
||||
* Sprite.damage will now kill the Sprite if health is less than or equal to 0 (before it would only kill if less than zero)
|
||||
* Sprite.worldCenterX and Sprite.worldCenterY are replaced by Sprite.world.x and Sprite.world.y
|
||||
|
||||
Better Text Handling
|
||||
--------------------
|
||||
|
@ -154,4 +155,4 @@ Which one do I use?!
|
|||
I've no idea, it depends on your game :) The choice is yours. If you need full-body physics, then p2 obviously. Arcade Physics has proven successful in lots of games so far, so you could carry on using that too. Or maybe if you like what you see re: Ninja's tiles, you could test that out. The important thing is that it's up to you now, and although it requires more careful planning with your game, you can even combine them too.
|
||||
|
||||
Phaser doesn't have all of these physics systems running together wasting CPU, they all start off as 'null' objects and do nothing until explicitly activated. I'm also tweaking the grunt scripts so that the build folder will provide versions of phaser with none, one or all physics systems embedded into the code, so they're not going to waste space either. The plan is to carry on adding support for popular physics systems in, most importantly Box2D and Chipmunk. Again these will be separate libs you can bundle in with phaser, with just a single variable stub in the physics manager. As long as the Body and World objects adhere to a few simple requirements, it will 'just work'.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue