TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.TpTween Class Referencesealed

Data structure for a tween. More...

Public Member Functions

override string ToString ()
void Rewind (bool clearLoopCount=true)
 'Rewind' the tween when looping completes
 TpTween ()
 Ctor (required for pooling!)
 TpTween (TpTween toCopy)
 Make a copy of another tween except for callbacks.

Properties

long Id [get, set]
 Instance Identifier. 0 indicates an error when an ID is returned from a method. This is the value returned from CreateTween methods.
string Tname = string.Empty [get, set]
 Name of tween. Used solely for lookups, optional.
float Duration [get, set]
 Time for tween to complete.
float StartTime [get, set]
 Start time (set internally)
EaseTarget EaseTarget [get, set]
 What type of tween? Position, Rotation, etc.
bool IsMatrixType [get]
 true if this is a Matrix, matrixColor, or MatrixColorConstantA tween.
LoopType LoopType [get, set]
 Looping control.
int NumLoops = -1 [get, set]
 How many loops? -1 means forever.
int CurrentLoopCount = 0 [get, set]
 loop count: set internally
TpEasingFunction.? Function EasingFunction [get, set]
 Easing function. This is the Ease for Position if additional Ease functions are provided for Rotation and scale. If either Rotation or Scale ease aren't provided then this is used.
TpEasingFunction.? Function RotationEase [get, set]
 Ease function for rotation (Matrix tweens only)
TpEasingFunction.? Function ScaleEase [get, set]
 Ease function for scale (Matrix tweens only)
Action< TpTween >? OnFinished [get, set]
 Callback when finished.
Action< TpTween >? OnLoopEnded [get, set]
 Callback when loop ended.
Action< TpTween, float >? OnRewindOrPingPong [get, set]
 Callback for rewind/pingpong.
Action< TpTween, float >? OnUpdate [get, set]
 Callback on every UpdateTweener. Callback includes TpTween instance and the current 'move so far' value.
GameObject? GameObject [get, set]
 The GameObject reference for GameObject tweens.
Action< TpTween, float >? GameObjectAction [get, set]
 The Action for GameObject tweening and for Custom tweens.
object? UserData [get, set]
 Custom user data, example: Used for Bezier curve evaluation.
object? OriginalUserData [get, set]
 Copy of original user data for rewinds.
Renderer? Renderer [get, set]
 The Renderer for Color Tweens.
SpriteRenderer? SpriteRenderer [get, set]
 The SpriteRenderer for Color tweens.
bool IsSpriteRenderer [get, set]
 TRUE for GameObject tweens using the SpriteRenderer.
Tilemap? Tilemap [get, set]
 Tilemap of the tile to tween.
TilePlusBaseTileInstance [get, set]
 Tile instance of the tile to tween.
Vector3Int TilePosition [get, set]
 Position of the tile to tween.
bool Invalid = false [get, set]
 Internal use only: returns the tween data structure to the pool.
bool Released = false [get, set]
 Internal use only: marks the tween as released to the pool.
bool Forward = true [get, set]
 Used when loop type is pingpong.
Vector3 StartValue [get, set]
 Initial Value for V3 tweens (position, scale, rotation)
Vector3 OriginalStartValue [get, set]
 Copy of StartValue added when instance is created.
Vector3 EndValue [get, set]
 End Value for V3 tweens (position, scale)
Vector3 CurrentTweenedValue [get, set]
 Current value of the tween when it's a Vector3.
Matrix4x4 StartMatrix = Matrix4x4.identity [get, set]
 StartValue for raw matrix tweens.
Matrix4x4 OriginalStartMatrix = Matrix4x4.identity [get, set]
 Copy of StartMatrix when instance is created.
Matrix4x4 EndMatrix = Matrix4x4.identity [get, set]
 EndValue for raw matrix tweens.
Matrix4x4 CurrentMatrix = Matrix4x4.identity [get, set]
 Current value for raw matrix tweens.
bool MatrixHasPosition [get, set]
 tween the Matrix position
bool MatrixHasRotation [get, set]
 tween the Matrix rotation
bool MatrixHasScale [get, set]
 tween the Matrix scale.
Color StartColor [get, set]
 Initial value for Color tweens.
Color OriginalStartColor [get, set]
 Copy of StartColor, added when instance created.
Color EndColor [get, set]
 End value for Color tweens.
Color CurrentTweenedColorValue [get, set]
 Current value of the tween for Color tweens.
float CurrentProgressValue [get, set]
 Current 'Progress' value for this tween.
string EaseInfo = string.Empty [get, set]
 Stringified easing info for diags.
bool Diagnostics [get, set]
 If true, extra diagnostics are printed.
bool SafeMode [get, set]
 Safe mode setting.
bool IsSane [get]
 Are references valid?
bool IsPartOfSequence [get, set]
 Is this tween part of a sequence?
TpTweenSequenceParentSequence [get, set]
 Parent sequence of this tween, if any.
static IEqualityComparer< TpTweenIdComparer = new IdEqualityComparer() [get]
 Comparer.

Detailed Description

Data structure for a tween.

Constructor & Destructor Documentation

◆ TpTween() [1/2]

TilePlus.TpTween.TpTween ( )

Ctor (required for pooling!)

◆ TpTween() [2/2]

TilePlus.TpTween.TpTween ( TpTween toCopy)

Make a copy of another tween except for callbacks.

Parameters
toCopy

Mainly for diagnostics. You can't get a copy, modify it, and insert into tweener. Also note this is an unpooled copy (which is why it can't be inserted into tweener, by design).

Member Function Documentation

◆ Rewind()

void TilePlus.TpTween.Rewind ( bool clearLoopCount = true)

'Rewind' the tween when looping completes

Note that NextId isn't reset to zero.

◆ ToString()

override string TilePlus.TpTween.ToString ( )

Property Documentation

◆ CurrentLoopCount

int TilePlus.TpTween.CurrentLoopCount = 0
getset

loop count: set internally

◆ CurrentMatrix

Matrix4x4 TilePlus.TpTween.CurrentMatrix = Matrix4x4.identity
getset

Current value for raw matrix tweens.

◆ CurrentProgressValue

float TilePlus.TpTween.CurrentProgressValue
getset

Current 'Progress' value for this tween.

◆ CurrentTweenedColorValue

Color TilePlus.TpTween.CurrentTweenedColorValue
getset

Current value of the tween for Color tweens.

◆ CurrentTweenedValue

Vector3 TilePlus.TpTween.CurrentTweenedValue
getset

Current value of the tween when it's a Vector3.

◆ Diagnostics

bool TilePlus.TpTween.Diagnostics
getset

If true, extra diagnostics are printed.

◆ Duration

float TilePlus.TpTween.Duration
getset

Time for tween to complete.

◆ EaseInfo

string TilePlus.TpTween.EaseInfo = string.Empty
getset

Stringified easing info for diags.

◆ EaseTarget

EaseTarget TilePlus.TpTween.EaseTarget
getset

What type of tween? Position, Rotation, etc.

◆ EasingFunction

TpEasingFunction.? Function TilePlus.TpTween.EasingFunction
getset

Easing function. This is the Ease for Position if additional Ease functions are provided for Rotation and scale. If either Rotation or Scale ease aren't provided then this is used.

◆ EndColor

Color TilePlus.TpTween.EndColor
getset

End value for Color tweens.

◆ EndMatrix

Matrix4x4 TilePlus.TpTween.EndMatrix = Matrix4x4.identity
getset

EndValue for raw matrix tweens.

◆ EndValue

Vector3 TilePlus.TpTween.EndValue
getset

End Value for V3 tweens (position, scale)

◆ Forward

bool TilePlus.TpTween.Forward = true
getset

Used when loop type is pingpong.

◆ GameObject

GameObject? TilePlus.TpTween.GameObject
getset

The GameObject reference for GameObject tweens.

◆ GameObjectAction

Action<TpTween,float>? TilePlus.TpTween.GameObjectAction
getset

The Action for GameObject tweening and for Custom tweens.

◆ Id

long TilePlus.TpTween.Id
getset

Instance Identifier. 0 indicates an error when an ID is returned from a method. This is the value returned from CreateTween methods.

◆ IdComparer

IEqualityComparer<TpTween> TilePlus.TpTween.IdComparer = new IdEqualityComparer()
staticget

Comparer.

◆ Invalid

bool TilePlus.TpTween.Invalid = false
getset

Internal use only: returns the tween data structure to the pool.

◆ IsMatrixType

bool TilePlus.TpTween.IsMatrixType
get

true if this is a Matrix, matrixColor, or MatrixColorConstantA tween.

◆ IsPartOfSequence

bool TilePlus.TpTween.IsPartOfSequence
getset

Is this tween part of a sequence?

◆ IsSane

bool TilePlus.TpTween.IsSane
get

Are references valid?

◆ IsSpriteRenderer

bool TilePlus.TpTween.IsSpriteRenderer
getset

TRUE for GameObject tweens using the SpriteRenderer.

◆ LoopType

LoopType TilePlus.TpTween.LoopType
getset

Looping control.

◆ MatrixHasPosition

bool TilePlus.TpTween.MatrixHasPosition
getset

tween the Matrix position

◆ MatrixHasRotation

bool TilePlus.TpTween.MatrixHasRotation
getset

tween the Matrix rotation

◆ MatrixHasScale

bool TilePlus.TpTween.MatrixHasScale
getset

tween the Matrix scale.

◆ NumLoops

int TilePlus.TpTween.NumLoops = -1
getset

How many loops? -1 means forever.

◆ OnFinished

Action<TpTween>? TilePlus.TpTween.OnFinished
getset

Callback when finished.

note that the tween may not be released until the next Update. Also note that if the parent tile isn't null when a tween is killed then OnFinished is still invoked. The tween instance is marked Invalid but at the point in time when OnFinished is invoked, the tween hasn't been returned to the pool so it's contents have not been reset yet. Hence, this callback should always be handled immediately. If not, save whatever data you need from the tween instance as it will be returned to a pool immediately after OnFinished is invoked.

◆ OnLoopEnded

Action<TpTween>? TilePlus.TpTween.OnLoopEnded
getset

Callback when loop ended.

◆ OnRewindOrPingPong

Action<TpTween,float>? TilePlus.TpTween.OnRewindOrPingPong
getset

Callback for rewind/pingpong.

passes tween and current time

◆ OnUpdate

Action<TpTween,float>? TilePlus.TpTween.OnUpdate
getset

Callback on every UpdateTweener. Callback includes TpTween instance and the current 'move so far' value.

Resource-intensive. Includes the live tween control instance: take care.

◆ OriginalStartColor

Color TilePlus.TpTween.OriginalStartColor
getset

Copy of StartColor, added when instance created.

◆ OriginalStartMatrix

Matrix4x4 TilePlus.TpTween.OriginalStartMatrix = Matrix4x4.identity
getset

Copy of StartMatrix when instance is created.

◆ OriginalStartValue

Vector3 TilePlus.TpTween.OriginalStartValue
getset

Copy of StartValue added when instance is created.

◆ OriginalUserData

object? TilePlus.TpTween.OriginalUserData
getset

Copy of original user data for rewinds.

◆ ParentSequence

TpTweenSequence? TilePlus.TpTween.ParentSequence
getset

Parent sequence of this tween, if any.

◆ Released

bool TilePlus.TpTween.Released = false
getset

Internal use only: marks the tween as released to the pool.

◆ Renderer

Renderer? TilePlus.TpTween.Renderer
getset

The Renderer for Color Tweens.

◆ RotationEase

TpEasingFunction.? Function TilePlus.TpTween.RotationEase
getset

Ease function for rotation (Matrix tweens only)

◆ SafeMode

bool TilePlus.TpTween.SafeMode
getset

Safe mode setting.

◆ ScaleEase

TpEasingFunction.? Function TilePlus.TpTween.ScaleEase
getset

Ease function for scale (Matrix tweens only)

◆ SpriteRenderer

SpriteRenderer? TilePlus.TpTween.SpriteRenderer
getset

The SpriteRenderer for Color tweens.

◆ StartColor

Color TilePlus.TpTween.StartColor
getset

Initial value for Color tweens.

◆ StartMatrix

Matrix4x4 TilePlus.TpTween.StartMatrix = Matrix4x4.identity
getset

StartValue for raw matrix tweens.

◆ StartTime

float TilePlus.TpTween.StartTime
getset

Start time (set internally)

◆ StartValue

Vector3 TilePlus.TpTween.StartValue
getset

Initial Value for V3 tweens (position, scale, rotation)

◆ TileInstance

TilePlusBase? TilePlus.TpTween.TileInstance
getset

Tile instance of the tile to tween.

◆ Tilemap

Tilemap? TilePlus.TpTween.Tilemap
getset

Tilemap of the tile to tween.

◆ TilePosition

Vector3Int TilePlus.TpTween.TilePosition
getset

Position of the tile to tween.

◆ Tname

string TilePlus.TpTween.Tname = string.Empty
getset

Name of tween. Used solely for lookups, optional.

◆ UserData

object? TilePlus.TpTween.UserData
getset

Custom user data, example: Used for Bezier curve evaluation.


The documentation for this class was generated from the following file:
  • /Users/jms/Documents/Tpt_55/TPT55/Assets/Plugins/TilePlus/Runtime/Services/Tweener/TpTween.cs