Class TweenParameters
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
Parameter container describing a single basic tween (non-popup) and its easing/duration.
[Serializable]
public class TweenParameters : ITweenParameters, ITweenBasicParameters
- Inheritance
-
objectTweenParameters
- Implements
Remarks
Holds a generic TweenType and an UnityEngine.AnimationCurve for easing, along with specific parameter blocks like MoveTweenParameters, RotateTweenParameters, ScaleTweenParameters, FadeCanvasGroupTweenParameters, OffsetTweenParameters, SizeTweenParameters, and TintGraphicTweenParameters. The engine chooses the applicable block based on Type.
Constructors
TweenParameters()
Initializes with defaults and creates empty parameter blocks for all tween types.
public TweenParameters()
TweenParameters(TweenType, AnimationCurve, float, MoveTweenParameters, RotateTweenParameters, ScaleTweenParameters, FadeCanvasGroupTweenParameters, OffsetTweenParameters, SizeTweenParameters, TintGraphicTweenParameters)
Constructs a tween parameter set with explicit parameter blocks.
public TweenParameters(TweenType tweenType, AnimationCurve ease, float duration, MoveTweenParameters moveParams, RotateTweenParameters rotateParams, ScaleTweenParameters scaleParams, FadeCanvasGroupTweenParameters fadeParams, OffsetTweenParameters offsetParams = null, SizeTweenParameters sizeParams = null, TintGraphicTweenParameters tintParams = null)
Parameters
tweenTypeTweenTypeThe tween type.
easeAnimationCurveThe easing curve.
durationfloatThe duration in seconds.
moveParamsMoveTweenParametersMove parameters block.
rotateParamsRotateTweenParametersRotate parameters block.
scaleParamsScaleTweenParametersScale parameters block.
fadeParamsFadeCanvasGroupTweenParametersCanvasGroup fade parameters block.
offsetParamsOffsetTweenParametersOffset parameters block.
sizeParamsSizeTweenParametersSize parameters block.
tintParamsTintGraphicTweenParametersTint parameters block.
Fields
_ease
[SerializeField]
protected AnimationCurve _ease
Field Value
- AnimationCurve
Properties
Coroutine
Runtime coroutine reference used during playback.
public Coroutine Coroutine { get; set; }
Property Value
- Coroutine
Duration
Duration in seconds for this tween.
public float Duration { get; }
Property Value
- float
Ease
Easing curve used by this tween.
public AnimationCurve Ease { get; }
Property Value
- AnimationCurve
FadeParameters
Parameter block for CanvasGroup fade tween.
public FadeCanvasGroupTweenParameters FadeParameters { get; }
Property Value
MoveParameters
Parameter block for movement tween.
public MoveTweenParameters MoveParameters { get; }
Property Value
OffsetParameters
Parameter block for RectTransform offset tween.
public OffsetTweenParameters OffsetParameters { get; }
Property Value
RotateParameters
Parameter block for rotation tween.
public RotateTweenParameters RotateParameters { get; }
Property Value
ScaleParameters
Parameter block for scale tween.
public ScaleTweenParameters ScaleParameters { get; }
Property Value
SizeParameters
Parameter block for RectTransform size tween.
public SizeTweenParameters SizeParameters { get; }
Property Value
TintParameters
Parameter block for Graphic tint tween.
public TintGraphicTweenParameters TintParameters { get; }
Property Value
Type
The tween type represented by this instance.
public TweenType Type { get; }