Inherits from CCNodeAdornmentBase : CCNode
Declared in CCNodeAdornments.h

Overview

An adornment CCNode that wraps a separate visible child CCSprite, and implements the CCNodeAdornmentProtocol such that, when activated, will fade the visible child CCSprite in over the adorned CCNode, and, when deactivated, will fade that child CCSprite out to make it invisible again. It is the child CCSprite that defines what the actual adornment will look like. That child may be any CCSprite.

Properties

peakOpacity

When activated, this CCNodeAdornmentOverlayFader instance will fade the sprite in from zero opacity to the value of this peakOpacity property, and when deactivated, will fade the adornmentNode back to zero opacity.

@property (nonatomic, assign) CCOpacity peakOpacity

Discussion

This value defaults to kCCOpacityFull, indicating that the adornmentNode should fade in from fully transparent to fully opaque. Setting this property to a lower value will allow the base CCNode to remain partially visible, making the sprite appear as a “shine” over the base CCNode.

Declared In

CCNodeAdornments.h

sprite

The visible CCSprite to be displayed as the visual child adornment.

@property (nonatomic, readonly) CCSprite *sprite

Declared In

CCNodeAdornments.h

Class Methods

adornmentWithSprite:

Allocates and initializes an autoreleased instance to use the specified CCSprite as the visual sprite and, when activated, to fade the sprite in from fully transparent fully opaque. The fade duration will default to kDefaultFadeDuration.

+ (id)adornmentWithSprite:(CCSprite *)aNode

Declared In

CCNodeAdornments.h

adornmentWithSprite:peakOpacity:

Allocates and initializes an autoreleased instance to use the specified CCSprite as the visual sprite and, when activated, to fade the sprite in from fully transparent up to the specified opacity. The fade duration will default to kDefaultFadeDuration.

+ (id)adornmentWithSprite:(CCSprite *)aNode peakOpacity:(CCOpacity)opacity

Declared In

CCNodeAdornments.h

adornmentWithSprite:peakOpacity:fadeDuration:

Allocates and initializes an autoreleased instance to use the specified CCSprite as the visual sprite and, when activated, to fade the sprite in from fully transparent up to the specified opacity, over the specified duration.

+ (id)adornmentWithSprite:(CCSprite *)sprite peakOpacity:(CCOpacity)opacity fadeDuration:(CCTime)aDuration

Declared In

CCNodeAdornments.h

Instance Methods

initWithSprite:

Initializes this instance to use the specified CCSprite as the visual sprite and, when activated, to fade the sprite in from fully transparent to fully opaque. The fade duration will default to kDefaultFadeDuration.

- (id)initWithSprite:(CCSprite *)aNode

Declared In

CCNodeAdornments.h

initWithSprite:peakOpacity:

Initializes this instance to use the specified CCSprite as the visual sprite and, when activated, to fade the sprite in from fully transparent up to the specified opacity. The fade duration will default to kDefaultFadeDuration.

- (id)initWithSprite:(CCSprite *)sprite peakOpacity:(CCOpacity)opacity

Declared In

CCNodeAdornments.h

initWithSprite:peakOpacity:fadeDuration:

Initializes this instance to use the specified CCSprite as the visual sprite and, when activated, to fade the sprite in from fully transparent up to the specified opacity, over the specified duration.

- (id)initWithSprite:(CCSprite *)sprite peakOpacity:(CCOpacity)opacity fadeDuration:(CCTime)aDuration

Declared In

CCNodeAdornments.h