cocos2d-iphone  1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
CCActionTween Interface Reference

#include <CCActionTween.h>

+ Inheritance diagram for CCActionTween:
+ Collaboration diagram for CCActionTween:

List of all members.

Public Member Functions

id initWithDuration:key:from:to: (ccTime aDuration,[key] NSString *key,[from] float from,[to] float to)

Static Public Member Functions

id actionWithDuration:key:from:to: (ccTime aDuration,[key] NSString *key,[from] float from,[to] float to)

Protected Attributes

NSString * key_
float from_
float to_
float delta_

Detailed Description

CCActionTween

CCActionTween is an action that lets you update any property of an object. For example, if you want to modify the "width" property of a target from 200 to 300 in 2 senconds, then:

id modifyWidth = [CCActionTween actionWithDuration:2 key:"width" from:200 to:300]; [target runAction:modifyWidth];

Another example: CCScaleTo action could be rewriten using CCPropertyAction:

scaleA and scaleB are equivalents id scaleA = [CCScaleTo actionWithDuration:2 scale:3]; id scaleB = [CCActionTween actionWithDuration:2 key:"scale" from:1 to:3];

Since:
v0.99.2

Member Function Documentation

id CCActionTween::actionWithDuration:key:from:to: ( ccTime  aDuration,
[key] NSString *  key,
[from] float  from,
[to] float  to 
) [static, virtual]

creates an initializes the action with the property name (key), and the from and to parameters.

id CCActionTween::initWithDuration:key:from:to: ( ccTime  aDuration,
[key] NSString *  key,
[from] float  from,
[to] float  to 
) [virtual]

initializes the action with the property name (key), and the from and to parameters.


The documentation for this interface was generated from the following file: