CCTransition Class Reference
Inherits from | CCScene : CCNode : CCResponder : NSObject |
---|---|
Declared in | CCTransition.h |
Overview
A transition animates the presentation of a new scene while moving the current scene out of view. A transition is optionally played when calling one of the presentScene:withTransition: methods of CCDirector.
Note: Since both scenes remain in memory and are being rendered, a transition may raise performance issues or memory warnings. If two complex scenes can not be reliably transitioned from/to it is best to not use transitions or to introduce an in-between scene that is presented only for a short period of time (ie a loading scene or merely a “fade to black” scene).
Other Methods
– initWithDuration:
Creates a blank transition from outgoing to incoming scene.
- (id)initWithDuration:(NSTimeInterval)duration
Parameters
duration |
The duration of the transition in seconds. |
---|
Return Value
The CCTransition Object.
Discussion
Note: Use this initializer only for implementing custom transitions.
Declared In
CCTransition.h
Transition Performance Settings
outgoingDownScale
Will downscale outgoing scene. Can be used as an effect, or to decrease render time on complex scenes. Default 1.0.
@property (nonatomic, assign) float outgoingDownScale
Declared In
CCTransition.h
incomingDownScale
Will downscale incoming scene. Can be used as an effect, or to decrease render time on complex scenes. Default 1.0.
@property (nonatomic, assign) float incomingDownScale
Declared In
CCTransition.h
transitionPixelFormat
Pixel format used for transition.
Default CCTexturePixelFormat_RGBA8888
.
@property (nonatomic, assign) CCTexturePixelFormat transitionPixelFormat
See Also
Declared In
CCTransition.h
transitionDepthStencilFormat
Depth/stencil format used for transition.
Default GL_DEPTH24_STENCIL8_OES
.
@property (nonatomic, assign) GLuint transitionDepthStencilFormat
Declared In
CCTransition.h
Controlling Scene Animation during Transition
outgoingSceneAnimated
Defines whether outgoing scene will be animated during transition. Default NO.
@property (nonatomic, getter=isOutgoingSceneAnimated) BOOL outgoingSceneAnimated
Declared In
CCTransition.h
incomingSceneAnimated
Defines whether incoming scene will be animated during transition. Default NO.
@property (nonatomic, getter=isIncomingSceneAnimated) BOOL incomingSceneAnimated
Declared In
CCTransition.h
outgoingOverIncoming
Defines whether incoming scene will be animated during transition. Default NO.
@property (nonatomic, assign) BOOL outgoingOverIncoming
Declared In
CCTransition.h
For use with Custom Transitions
incomingTexture
CCRenderTexture, holding the incoming scene as a texture Only valid after prepareTransition has been called.
@property (nonatomic, readonly) CCRenderTexture *incomingTexture
Declared In
CCTransition.h
outgoingTexture
CCRenderTexture, holding the outgoing scene as a texture Only valid after prepareTransition has been called.
@property (nonatomic, readonly) CCRenderTexture *outgoingTexture
Declared In
CCTransition.h