rubymotion/Joybox — pull request #34 by rkachowski (2013-06-26 19:59:38+00:00)
Title: Only take position from body member in PhysicsSprite if the body member is set

If you try to use a PhysicsSprite without passing a body parameter in to the constructor everything will explode, as sprite.rb:19 manipulates the position property of the object. As the body parameter is optional this seems like it is a bug to me.

This patch changes it so that the position is only take from the body object if it exists. This is useful if you want to create a physics sprite, and then create the body based on the attributes of it's visual appearance (which are only available after construction).