cpCCNodeProtocol Protocol Reference
| Conforms to | NSObject |
| Declared in | cpCCNodeImpl.h |
Overview
Our protocol that our CocosNode objects follow, these include:
-cpSprite
-cpShapeNode
-cpAtlasSprite
Tasks
-
ignoreRotationSet this if you don’t want this object to sync with the body’s rotation
property required method -
autoFreeShapeAndBodySet this to true if you want the shape and/or body to be free’d when we’re released
property required method -
integrationDtIf this is anything other than zero, a position change will update the shapes velocity using integrationDt to calculate it
property required method -
shapeThe shape, if any, that we’re connected to. Setting this will also set the body
property required method -
shapesThe shapes, each wrapped in an NSValue, that our body is connected to
property required method -
bodyThe body, if any, that we’re connected to. You may have a body with no shape set
property required method -
spaceManagerIf autoFreeShapeAndBody is set, then this must be set too
property required method -
– applyImpulse: -
– applyImpulse:offset: -
– applyForce: -
– applyForce:offset: -
– resetForces
Properties
autoFreeShapeAndBody
Set this to true if you want the shape and/or body to be free’d when we’re released
@property (nonatomic, readwrite, assign) BOOL autoFreeShapeAndBodyDeclared In
cpCCNodeImpl.hbody
The body, if any, that we’re connected to. You may have a body with no shape set
@property (nonatomic, readwrite, assign) cpBody *bodyDeclared In
cpCCNodeImpl.hignoreRotation
Set this if you don’t want this object to sync with the body’s rotation
@property (nonatomic, readwrite, assign) BOOL ignoreRotationDeclared In
cpCCNodeImpl.hintegrationDt
If this is anything other than zero, a position change will update the shapes velocity using integrationDt to calculate it
@property (nonatomic, readwrite, assign) cpFloat integrationDtDeclared In
cpCCNodeImpl.hshape
The shape, if any, that we’re connected to. Setting this will also set the body
@property (nonatomic, readwrite, assign) cpShape *shapeDeclared In
cpCCNodeImpl.h