Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8ff70902d0
Fetching contributors…

Cannot retrieve contributors at this time

file 283 lines (251 sloc) 7.669 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
/* cocos2d for iPhone
*
* http://www.cocos2d-iphone.org
*
* Copyright (C) 2008,2009 Ricardo Quesada
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the 'cocos2d for iPhone' license.
*
* You will find a copy of this license within the cocos2d for iPhone
* distribution inside the "LICENSE" file.
*
*/

#import "CCScene.h"
@class CCIntervalAction;
@class CCNode;

/** CCTransitionEaseScene can ease the actions of the scene protocol.
@since v0.8.2
*/
@protocol CCTransitionEaseScene <NSObject>
/** returns the Ease action that will be performed on a linear action.
@since v0.8.2
*/
-(CCIntervalAction*) easeActionWithAction:(CCIntervalAction*)action;
@end

/** Orientation Type used by some transitions
*/
typedef enum {
/// An horizontal orientation where the Left is nearer
kOrientationLeftOver = 0,
/// An horizontal orientation where the Right is nearer
kOrientationRightOver = 1,
/// A vertical orientation where the Up is nearer
kOrientationUpOver = 0,
/// A vertical orientation where the Bottom is nearer
kOrientationDownOver = 1,
} tOrientation;

/** Base class for CCTransition scenes
*/
@interface CCTransitionScene : CCScene {
CCScene *inScene;
CCScene *outScene;
ccTime duration;
BOOL inSceneOnTop;
BOOL sendCleanupToScene;
}
/** creates a base transition with duration and incoming scene */
+(id) transitionWithDuration:(ccTime) t scene:(CCScene*)s;
/** initializes a transition with duration and incoming scene */
-(id) initWithDuration:(ccTime) t scene:(CCScene*)s;
/** called after the transition finishes */
-(void) finish;
/** used by some transitions to hide the outter scene */
-(void) hideOutShowIn;
@end

/** A CCTransition that supports orientation like.
* Possible orientation: LeftOver, RightOver, UpOver, DownOver
*/
@interface CCOrientedTransitionScene : CCTransitionScene
{
tOrientation orientation;
}
/** creates a base transition with duration and incoming scene */
+(id) transitionWithDuration:(ccTime) t scene:(CCScene*)s orientation:(tOrientation)o;
/** initializes a transition with duration and incoming scene */
-(id) initWithDuration:(ccTime) t scene:(CCScene*)s orientation:(tOrientation)o;
@end


/** CCRotoZoomTransition:
Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming
*/
@interface CCRotoZoomTransition : CCTransitionScene
{}
@end

/** CCJumpZoomTransition:
Zoom out and jump the outgoing scene, and then jump and zoom in the incoming
*/
@interface CCJumpZoomTransition : CCTransitionScene
{}
@end

/** CCMoveInLTransition:
Move in from to the left the incoming scene.
*/
@interface CCMoveInLTransition : CCTransitionScene <CCTransitionEaseScene>
{}
/** initializes the scenes */
-(void) initScenes;
/** returns the action that will be performed */
-(CCIntervalAction*) action;
@end

/** CCMoveInRTransition:
Move in from to the right the incoming scene.
*/
@interface CCMoveInRTransition : CCMoveInLTransition
{}
@end

/** CCMoveInTTransition:
Move in from to the top the incoming scene.
*/
@interface CCMoveInTTransition : CCMoveInLTransition
{}
@end

/** CCMoveInBTransition:
Move in from to the bottom the incoming scene.
*/
@interface CCMoveInBTransition : CCMoveInLTransition
{}
@end

/** CCSlideInLTransition:
Slide in the incoming scene from the left border.
*/
@interface CCSlideInLTransition : CCTransitionScene <CCTransitionEaseScene>
{}
/** initializes the scenes */
-(void) initScenes;
/** returns the action that will be performed by the incomming and outgoing scene */
-(CCIntervalAction*) action;
@end

/** CCSlideInRTransition:
Slide in the incoming scene from the right border.
*/
@interface CCSlideInRTransition : CCSlideInLTransition
{}
@end

/** CCSlideInBTransition:
Slide in the incoming scene from the bottom border.
*/
@interface CCSlideInBTransition : CCSlideInLTransition
{}
@end

/** CCSlideInTTransition:
Slide in the incoming scene from the top border.
*/
@interface CCSlideInTTransition : CCSlideInLTransition
{}
@end

/**
Shrink the outgoing scene while grow the incoming scene
*/
@interface CCShrinkGrowTransition : CCTransitionScene <CCTransitionEaseScene>
{}
@end

/** CCFlipXTransition:
Flips the screen horizontally.
The front face is the outgoing scene and the back face is the incoming scene.
*/
@interface CCFlipXTransition : CCOrientedTransitionScene
{}
@end

/** CCFlipYTransition:
Flips the screen vertically.
The front face is the outgoing scene and the back face is the incoming scene.
*/
@interface CCFlipYTransition : CCOrientedTransitionScene
{}
@end

/** CCFlipAngularTransition:
Flips the screen half horizontally and half vertically.
The front face is the outgoing scene and the back face is the incoming scene.
*/
@interface CCFlipAngularTransition : CCOrientedTransitionScene
{}
@end

/** CCZoomFlipXTransition:
Flips the screen horizontally doing a zoom out/in
The front face is the outgoing scene and the back face is the incoming scene.
*/
@interface CCZoomFlipXTransition : CCOrientedTransitionScene
{
}
@end

/** CCZoomFlipYTransition:
Flips the screen vertically doing a little zooming out/in
The front face is the outgoing scene and the back face is the incoming scene.
*/
@interface CCZoomFlipYTransition : CCOrientedTransitionScene
{}
@end

/** CCZoomFlipAngularTransition:
Flips the screen half horizontally and half vertically doing a little zooming out/in.
The front face is the outgoing scene and the back face is the incoming scene.
*/
@interface CCZoomFlipAngularTransition : CCOrientedTransitionScene
{}
@end

/** CCFadeTransition:
Fade out the outgoing scene and then fade in the incoming scene.'''
*/
@interface CCFadeTransition : CCTransitionScene
{
ccColor4B color;
}
/** creates the transition with a duration and with an RGB color
* Example: [FadeTransition transitionWithDuration:2 scene:s withColor:ccc3(255,0,0)]; // red color
*/
+(id) transitionWithDuration:(ccTime)duration scene:(CCScene*)scene withColor:(ccColor3B)color;
/** initializes the transition with a duration and with an RGB color */
-(id) initWithDuration:(ccTime)duration scene:(CCScene*)scene withColor:(ccColor3B)color;
@end

/**
CCCrossFadeTransition:
Cross fades two scenes using the CCRenderTexture object.
*/
@class CCRenderTexture;
@interface CCCrossFadeTransition : CCTransitionScene
{
}
@end

/** CCTurnOffTilesTransition:
Turn off the tiles of the outgoing scene in random order
*/
@interface CCTurnOffTilesTransition : CCTransitionScene <CCTransitionEaseScene>
{}
@end

/** CCSplitColsTransition:
The odd columns goes upwards while the even columns goes downwards.
*/
@interface CCSplitColsTransition : CCTransitionScene <CCTransitionEaseScene>
{}
-(CCIntervalAction*) action;
@end

/** CCSplitRowsTransition:
The odd rows goes to the left while the even rows goes to the right.
*/
@interface CCSplitRowsTransition : CCSplitColsTransition
{}
@end

/** CCFadeTRTransition:
Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner.
*/
@interface CCFadeTRTransition : CCTransitionScene <CCTransitionEaseScene>
{}
-(CCIntervalAction*) actionWithSize:(ccGridSize) vector;
@end

/** CCFadeBLTransition:
Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner.
*/
@interface CCFadeBLTransition : CCFadeTRTransition
{}
@end

/** CCFadeUpTransition:
* Fade the tiles of the outgoing scene from the bottom to the top.
*/
@interface CCFadeUpTransition : CCFadeTRTransition
{}
@end

/** CCFadeDownTransition:
* Fade the tiles of the outgoing scene from the top to the bottom.
*/
@interface CCFadeDownTransition : CCFadeTRTransition
{}
@end
Something went wrong with that request. Please try again.