ActionTweenGeneric< T > Class Template Reference

The base class for generic interpolating actions, you just pass set/get functions. More...

Inheritance diagram for ActionTweenGeneric< T >:
ActionWithDuration ActionBase ActionTweenGenericVector2 ActionTweenGenericVector2Rotation ActionTweenGenericVector2Scale ActionTweenGenericVector4 MoveBy MoveTo SkewBy SkewTo RotateBy RotateTo ScaleBy ScaleTo TintBy TintTo

List of all members.

Public Member Functions

delegate void DSet (T value)
 Target value set function delegate.
delegate T DGet ()
 Target value get function delegate.
 ActionTweenGeneric ()
 ActionTweenGeneric constructor.
 ActionTweenGeneric (DGet dget, DSet dset)
 ActionTweenGeneric constructor.
override void Run ()
 Kick this action.
override void Update (float dt)
 The update function.

Public Attributes

TargetValue
 The target value.
bool IsRelative = false
 If true, the target value is an offset.
DTween Tween = (t) => Math.PowEaseOut(t,4.0f)
 The tween/interpolation function, basically a f(x) function where f(x) goes from 0 to 1 when x goes from 0 to 1.
DSet Set
 The function that sets the current value as we execute the tween.
DGet Get
 The function that gets the current value as we execute the tween.

Detailed Description

template<T>
class Sce::PlayStation::HighLevel::GameEngine2D::ActionTweenGeneric< T >

The base class for generic interpolating actions, you just pass set/get functions.

This is an abstract class.


Member Data Documentation

DTween Tween = (t) => Math.PowEaseOut(t,4.0f)

The tween/interpolation function, basically a f(x) function where f(x) goes from 0 to 1 when x goes from 0 to 1.

Example of function you can set DTween to:

(t) => Math.Linear(t);

(t) => Math.ExpEaseIn(t,1.0f);

(t) => Math.ExpEaseOut(t,1.0f);

(t) => Math.PowEaseIn(t,4.0f);

(t) => Math.PowEaseOut(t,4.0f);

(t) => Math.PowEaseInOut(t,4.0f);

(t) => Math.BackEaseIn(t,1.0f);

(t) => Math.BackEaseOut(t,1.0f);

(t) => Math.BackEaseInOut(t,1.0f);

(t) => Math.PowerfulScurve(t,3.7f,3.7f);

(t) => Math.Impulse(t,10.0f);

(t) => FMath.Sin(t*Math.Pi*0.5f); // for sin curve tween

More about tweens can be found int he cocos2d documentaiton which itselfs points to:

http://www.robertpenner.com/easing/easing_demo.html

http://www.robertpenner.com/easing/penner_chapter7_tweening.pdf