Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.Tween.PositionTweener Class Reference

A tweener that tweens position. More...

Inheritance diagram for PlatformerPro.Tween.PositionTweener:
PlatformerPro.Tween.ITweener< Transform, Vector3 > PlatformerPro.Tween.LocalPositionTweener

Public Member Functions

virtual void TweenWithTime (TweenMode tweenMode, Transform target, Vector3 destination, float time, Action< Transform, Vector3 > callback)
 Tweens target transform to destination position over time. More...
 
virtual void TweenWithRate (TweenMode tweenMode, Transform target, Vector3 destination, float speed, Action< Transform, Vector3 > callback)
 Tweens target transform to destination position with given rate (speed). More...
 
void Stop ()
 Stops the active tween. More...
 
- Public Member Functions inherited from PlatformerPro.Tween.ITweener< Transform, Vector3 >
void TweenWithTime (TweenMode mode, T target, P destination, float time, Action< T, P > callback)
 Tweens target to destination over time. More...
 
void TweenWithRate (TweenMode mode, T target, P destination, float rate, Action< T, P > callback)
 Tweens target to destination at rate. More...
 
void Stop ()
 Stops the active tween. More...
 

Protected Member Functions

virtual IEnumerator DoEasedTween ()
 Does the tween using an easing function. More...
 
float BezierBlend (float t)
 
float Linear (float t)
 

Protected Attributes

Vector3 destination
 
float speed
 
float time
 
Transform target
 
Vector3 direction
 
Action< Transform, Vector3 > callback
 
Func< float, float > easingFunction
 

Properties

bool Active [get, protected set]
 Is tweener currently tweening. More...
 
bool UseGameTime [get, set]
 If true use TimeManager.FrameTime false use Unitys Time.deltaTime More...
 
- Properties inherited from PlatformerPro.Tween.ITweener< Transform, Vector3 >
bool Active [get]
 Is tweener currently tweening. More...
 
bool UseGameTime [get, set]
 If true use TimeManager.FrameTime false use Unitys Time.deltaTime More...
 

Detailed Description

A tweener that tweens position.

Member Function Documentation

◆ BezierBlend()

float PlatformerPro.Tween.PositionTweener.BezierBlend ( float  t)
protected

◆ DoEasedTween()

virtual IEnumerator PlatformerPro.Tween.PositionTweener.DoEasedTween ( )
protectedvirtual

Does the tween using an easing function.

Returns
The eased tween.

Reimplemented in PlatformerPro.Tween.LocalPositionTweener.

◆ Linear()

float PlatformerPro.Tween.PositionTweener.Linear ( float  t)
protected

◆ Stop()

void PlatformerPro.Tween.PositionTweener.Stop ( )

Stops the active tween.

◆ TweenWithRate()

virtual void PlatformerPro.Tween.PositionTweener.TweenWithRate ( TweenMode  tweenMode,
Transform  target,
Vector3  destination,
float  speed,
Action< Transform, Vector3 >  callback 
)
virtual

Tweens target transform to destination position with given rate (speed).

Parameters
modeHow to tween.
targetTarget object.
finalPositionFinal position.
speedHow fast to move.
callbackCallback.
Returns
The isntance doing the tween.

Not actually tweening

Reimplemented in PlatformerPro.Tween.LocalPositionTweener.

◆ TweenWithTime()

virtual void PlatformerPro.Tween.PositionTweener.TweenWithTime ( TweenMode  tweenMode,
Transform  target,
Vector3  destination,
float  time,
Action< Transform, Vector3 >  callback 
)
virtual

Tweens target transform to destination position over time.

Parameters
modehow to tween.
targetTarget object.
destinationFinal position.
timeTime to take to do the tween.
callbackCalled when tween completes.
Returns
The isntance doing the tween.

Not actually tweening

Reimplemented in PlatformerPro.Tween.LocalPositionTweener.

Member Data Documentation

◆ callback

Action<Transform, Vector3> PlatformerPro.Tween.PositionTweener.callback
protected

◆ destination

Vector3 PlatformerPro.Tween.PositionTweener.destination
protected

◆ direction

Vector3 PlatformerPro.Tween.PositionTweener.direction
protected

◆ easingFunction

Func<float, float> PlatformerPro.Tween.PositionTweener.easingFunction
protected

◆ speed

float PlatformerPro.Tween.PositionTweener.speed
protected

◆ target

Transform PlatformerPro.Tween.PositionTweener.target
protected

◆ time

float PlatformerPro.Tween.PositionTweener.time
protected

Property Documentation

◆ Active

bool PlatformerPro.Tween.PositionTweener.Active
getprotected set

Is tweener currently tweening.

true if active; otherwise, false.

◆ UseGameTime

bool PlatformerPro.Tween.PositionTweener.UseGameTime
getset

If true use TimeManager.FrameTime false use Unitys Time.deltaTime

true if use game time; otherwise, false.


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