CocosSharp.CCActionTween Class
ActionTween

See Also: CCActionTween Members

Syntax

public class CCActionTween : CCFiniteTimeAction

Remarks

ActionTween

ActionTween

CocosSharp.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 seconds, then:

CocosSharp.CCActionTween

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

CocosSharp.CCActionTween

Another example: CocosSharp.CCScaleTo action could be rewritten using PropertyAction:

CocosSharp.CCScaleTo

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

CocosSharp.CCScaleTo CocosSharp.CCActionTween

v0.99.2

v0.99.2

When this action is added to a CCNode, the action will run over a period of time.

Requirements

Namespace: CocosSharp
Assembly: CocosSharp (in CocosSharp.dll)