Show / Hide Table of Contents

class Peachy

Methods for creating new tweens and operating on tweens in groups.

Syntax
public static class Peachy

Methods

View Source

KillAllWithTarget(Object, Boolean)

Kill all tweens targeting an object.

Declaration
public static void KillAllWithTarget(object target, bool complete = false)
Parameters
Type Name Description
System.Object target

The target object.

System.Boolean complete

Progress tween to end value and trigger OnComplete handlers.

See Also
SetTarget<T>(T)
View Source

Run<TGroup>(Single)

Update a custom group of tweens.

Declaration
public static void Run<TGroup>(float deltaTime)
    where TGroup : struct
Parameters
Type Name Description
System.Single deltaTime
Type Parameters
Name Description
TGroup

An empty struct that is used as an identifier for your custom group.

Remarks

Tweens default to the Update group, but custom groups can be assigned using SetGroup.

View Source

Sequence()

Create a new Sequence.

Declaration
public static Sequence Sequence()
Returns
Type Description
Sequence

Thw newly created sequence.

View Source

Tween(Single, Single, Single, Action<Single>)

Create a new float tween.

Declaration
public static Tween Tween(float from, float to, float duration, Action<float> onChange)
Parameters
Type Name Description
System.Single from

The starting value.

System.Single to

The end value.

System.Single duration

Total tween duration in seconds.

System.Action<System.Single> onChange

A callback that will be invoked every time the tween value changes.

Returns
Type Description
Tween

The newly created tween.

View Source

Tween(Color, Color, Single, Action<Color>)

Create a new Color tween.

Declaration
public static Tween Tween(Color from, Color to, float duration, Action<Color> onChange)
Parameters
Type Name Description
UnityEngine.Color from

The starting value.

UnityEngine.Color to

The end value.

System.Single duration

Total tween duration in seconds.

System.Action<UnityEngine.Color> onChange

A callback that will be invoked every time the tween value changes.

Returns
Type Description
Tween

The newly created tween.

View Source

Tween(Quaternion, Quaternion, Single, Action<Quaternion>)

Create a new Quaternion tween.

Declaration
public static Tween Tween(Quaternion from, Quaternion to, float duration, Action<Quaternion> onChange)
Parameters
Type Name Description
UnityEngine.Quaternion from

The starting value.

UnityEngine.Quaternion to

The end value.

System.Single duration

Total tween duration in seconds.

System.Action<UnityEngine.Quaternion> onChange

A callback that will be invoked every time the tween value changes.

Returns
Type Description
Tween

The newly created tween.

View Source

Tween(Vector2, Vector2, Single, Action<Vector2>)

Create a new Vector2 tween.

Declaration
public static Tween Tween(Vector2 from, Vector2 to, float duration, Action<Vector2> onChange)
Parameters
Type Name Description
UnityEngine.Vector2 from

The starting value.

UnityEngine.Vector2 to

The end value.

System.Single duration

Total tween duration in seconds.

System.Action<UnityEngine.Vector2> onChange

A callback that will be invoked every time the tween value changes.

Returns
Type Description
Tween

The newly created tween.

View Source

Tween(Vector3, Vector3, Single, Action<Vector3>)

Create a new Vector3 tween.

Declaration
public static Tween Tween(Vector3 from, Vector3 to, float duration, Action<Vector3> onChange)
Parameters
Type Name Description
UnityEngine.Vector3 from

The starting value.

UnityEngine.Vector3 to

The end value.

System.Single duration

Total tween duration in seconds.

System.Action<UnityEngine.Vector3> onChange

A callback that will be invoked every time the tween value changes.

Returns
Type Description
Tween

The newly created tween.

View Source

Tween(Vector4, Vector4, Single, Action<Vector4>)

Create a new Vector4 tween.

Declaration
public static Tween Tween(Vector4 from, Vector4 to, float duration, Action<Vector4> onChange)
Parameters
Type Name Description
UnityEngine.Vector4 from

The starting value.

UnityEngine.Vector4 to

The end value.

System.Single duration

Total tween duration in seconds.

System.Action<UnityEngine.Vector4> onChange

A callback that will be invoked every time the tween value changes.

Returns
Type Description
Tween

The newly created tween.

  • View Source
On this page
Back to top Generated by DocFX