I am new to Cocos2D and I've realized that most of the codes written before the Cocos2d update used CCSprites. Recently I realized a lot of more recent codes after the update are using PhysicsSprite. What is the difference? What advantages does one have over the other, if any?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
PhysicsSprite is a CCSprite which uses a physics body to control the sprite's motion (position) and rotation. Depending on whether you start with the Box2D or Chipmunk template, PhysicsSprite will either have a b2Body (Box2D) or a cpBody/cpShape (Chipmunk) as instance variables. If you're not planning to use physics, use CCSprite. If you do, use PhysicsSprite for those sprites which represent physics objects. |
|||
|
|