Skip to main content
added 29 characters in body
Source Link

I asked in SO, but no responses so I'm posting here since it's probably more relevant here.

EDIT: SO question closed.

I'm trying to tween primitive data-types the way Action tweens position to create movement. The main reason is to take advantage of the easing functions, rather than hand-code all the easing. This is helpful when implementing things like tweening money counter values (When the teller's display goes ka-ching, you can see the number tween towards the final value.)

Is there a way to directly apply Action or some variant of this onto datatypes like int or float?

Or do I have to cheat by keeping a Node, apply the Action onto the node's property, and read the property? (I'd rather not do this)

I asked in SO, but no responses so I'm posting here since it's probably more relevant here.

I'm trying to tween primitive data-types the way Action tweens position to create movement. The main reason is to take advantage of the easing functions, rather than hand-code all the easing. This is helpful when implementing things like tweening money counter values (When the teller's display goes ka-ching, you can see the number tween towards the final value.)

Is there a way to directly apply Action or some variant of this onto datatypes like int or float?

Or do I have to cheat by keeping a Node, apply the Action onto the node's property, and read the property? (I'd rather not do this)

I asked in SO, but no responses so I'm posting here since it's probably more relevant here.

EDIT: SO question closed.

I'm trying to tween primitive data-types the way Action tweens position to create movement. The main reason is to take advantage of the easing functions, rather than hand-code all the easing. This is helpful when implementing things like tweening money counter values (When the teller's display goes ka-ching, you can see the number tween towards the final value.)

Is there a way to directly apply Action or some variant of this onto datatypes like int or float?

Or do I have to cheat by keeping a Node, apply the Action onto the node's property, and read the property? (I'd rather not do this)

Post Reopened by user1430
Post Closed as "Not suitable for this site" by user1430
Source Link

Cocos2d: Tweening primitive data-types

I asked in SO, but no responses so I'm posting here since it's probably more relevant here.

I'm trying to tween primitive data-types the way Action tweens position to create movement. The main reason is to take advantage of the easing functions, rather than hand-code all the easing. This is helpful when implementing things like tweening money counter values (When the teller's display goes ka-ching, you can see the number tween towards the final value.)

Is there a way to directly apply Action or some variant of this onto datatypes like int or float?

Or do I have to cheat by keeping a Node, apply the Action onto the node's property, and read the property? (I'd rather not do this)