CCActionFadeTo Class Reference
Inherits from | CCActionInterval : CCActionFiniteTime : CCAction : NSObject |
---|---|
Conforms to | NSCopying |
Declared in | CCActionInterval.h |
Overview
This action fades the target, it modifies the opacity from the current value to the specified value.
Note: If you want the children to fade too use [CCNode cascadeOpacityEnabled] to enable this behavior in the node.
Creating a Fade Action
+ actionWithDuration:opacity:
Creates a fade action.
+ (id)actionWithDuration:(CCTime)duration opacity:(CGFloat)opactiy
Parameters
duration |
Action duration. |
---|---|
opactiy |
Opacity to fade to. |
Return Value
New fade action.
Declared In
CCActionInterval.h
– initWithDuration:opacity:
Initalizes a fade action.
- (id)initWithDuration:(CCTime)duration opacity:(CGFloat)opacity
Parameters
duration |
Action duration. |
---|---|
opacity |
Opacity to fade to. |
Return Value
New fade action.
Declared In
CCActionInterval.h