Inherits from CCNodeRGBA : CCNode : NSObject
Declared in CCProgressTimer.h

Overview

CCProgresstimer is a subclass of CCNode. It renders the inner sprite according to the percentage. The progress can be Radial, Horizontal or vertical.

Tasks

Other Methods

  •   type
    Change the percentage to change progress. 
    
    property
  •   reverseDirection property
  •   vertexData property
  •   vertexDataCount property
  •   midpoint
    Midpoint is used to modify the progress start position.
    If you're using radials type then the midpoint changes the center point
    If you're using bar type the the midpoint changes the bar growth
        it expands from the center but clamps to the sprites edge so:
        you want a left to right then set the midpoint all the way to ccp(0,y)
        you want a right to left then set the midpoint all the way to ccp(1,y)
        you want a bottom to top then set the midpoint all the way to ccp(x,0)
        you want a top to bottom then set the midpoint all the way to ccp(x,1)
    
    property
  •   barChangeRate
    This allows the bar type to move the component at a specific rate
    Set the component to 0 to make sure it stays at 100%.
    For example you want a left to right bar but not have the height stay 100%
    Set the rate to be ccp(0,1); and set the midpoint to = ccp(0,.5f);
    
    property
  •   percentage

    Percentages are from 0 to 100

    property
  •   sprite

    The image to show the progress percentage

    property
  • + progressWithSprite:

    Creates a progress timer with the sprite as the shape the timer goes through

  • – initWithSprite:

    Initializes a progress timer with the sprite as the shape the timer goes through

Other Methods

  • + progressWithFile:

    Creates a progress timer with an image filename as the shape the timer goes through

  • – initWithFile:

    Initializes a progress timer with an image filename as the shape the timer goes through

  • + progressWithTexture:

    Creates a progress timer with the texture as the shape the timer goes through

  • – initWithTexture:

    Creates a progress timer with the texture as the shape the timer goes through

Properties

barChangeRate

This allows the bar type to move the component at a specific rate
Set the component to 0 to make sure it stays at 100%.
For example you want a left to right bar but not have the height stay 100%
Set the rate to be ccp(0,1); and set the midpoint to = ccp(0,.5f);
@property (nonatomic, readwrite) CGPoint barChangeRate

Declared In

CCProgressTimer.h

midpoint

Midpoint is used to modify the progress start position.
If you're using radials type then the midpoint changes the center point
If you're using bar type the the midpoint changes the bar growth
    it expands from the center but clamps to the sprites edge so:
    you want a left to right then set the midpoint all the way to ccp(0,y)
    you want a right to left then set the midpoint all the way to ccp(1,y)
    you want a bottom to top then set the midpoint all the way to ccp(x,0)
    you want a top to bottom then set the midpoint all the way to ccp(x,1)
@property (nonatomic, readwrite) CGPoint midpoint

Declared In

CCProgressTimer.h

percentage

Percentages are from 0 to 100

@property (nonatomic, readwrite) float percentage

Declared In

CCProgressTimer.h

reverseDirection

sprite

The image to show the progress percentage

@property (nonatomic, readwrite, retain) CCSprite *sprite

Declared In

CCProgressTimer.h

type

Change the percentage to change progress. 
@property (nonatomic, readwrite) CCProgressTimerType type

Declared In

CCProgressTimer.h

vertexData

vertexDataCount

Class Methods

progressWithFile:

Creates a progress timer with an image filename as the shape the timer goes through

+ (id)progressWithFile:(NSString *)filename

Declared In

CCProgressTimer.h

progressWithSprite:

Creates a progress timer with the sprite as the shape the timer goes through

+ (id)progressWithSprite:(CCSprite *)sprite

Declared In

CCProgressTimer.h

progressWithTexture:

Creates a progress timer with the texture as the shape the timer goes through

+ (id)progressWithTexture:(CCTexture2D *)texture

Declared In

CCProgressTimer.h

Instance Methods

initWithFile:

Initializes a progress timer with an image filename as the shape the timer goes through

- (id)initWithFile:(NSString *)filename

Declared In

CCProgressTimer.h

initWithSprite:

Initializes a progress timer with the sprite as the shape the timer goes through

- (id)initWithSprite:(CCSprite *)sprite

Declared In

CCProgressTimer.h

initWithTexture:

Creates a progress timer with the texture as the shape the timer goes through

- (id)initWithTexture:(CCTexture2D *)texture

Declared In

CCProgressTimer.h