C# Class PunkX.Tween

Base class for all Tween objects, can be added to any Core-extended classes.
Show file Open project: RichardMarks/PunkX Class Usage Examples

Public Properties

Property Type Description
active System.Boolean
complete CompletionDelegate

Protected Properties

Property Type Description
_ease EaserDelegate
_t float
_target uint
_time float

Public Methods

Method Description
Tween ( uint duration, uint type, CompletionDelegate onCompletion = null, EaserDelegate ease = null ) : System

Constructor. Specify basic information about the Tween.

start ( ) : void

Starts the Tween, or restarts it if it's currently running.

update ( ) : void

Updates the Tween, called by World.

Private Methods

Method Description
finish ( ) : void

Called when the Tween completes.

Method Details

Tween() public method

Constructor. Specify basic information about the Tween.
public Tween ( uint duration, uint type, CompletionDelegate onCompletion = null, EaserDelegate ease = null ) : System
duration uint Duration of the tween (in seconds or frames).
type uint Tween type, one of Tween.PERSIST (default), Tween.LOOPING, or Tween.ONESHOT.
onCompletion CompletionDelegate Optional callback for when the Tween completes.
ease EaserDelegate Optional easer function to apply to the Tweened value.
return System

start() public method

Starts the Tween, or restarts it if it's currently running.
public start ( ) : void
return void

update() public method

Updates the Tween, called by World.
public update ( ) : void
return void

Property Details

_ease protected property

protected EaserDelegate _ease
return EaserDelegate

_t protected property

protected float _t
return float

_target protected property

protected uint _target
return uint

_time protected property

protected float _time
return float

active public property

if the tween should update
public Boolean,System active
return System.Boolean

complete public property

callback function to be called when the tween has finished
public CompletionDelegate complete
return CompletionDelegate