diff options
Diffstat (limited to 'Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs')
-rw-r--r-- | Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs b/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs index 55ff647..34d6abb 100644 --- a/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs +++ b/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs @@ -9,19 +9,19 @@ namespace TweenAnimation [Serializable]
public class TweenAlpha : TweenModule
{
- public Graphic target;
public float from;
public float to;
+ public Graphic graphic;
protected override void SetValue(float time)
{
float t = time / duration;
float alpha = Mathf.Lerp(from, to, t);
- if (target != null)
+ if (graphic != null)
{
- Color c = target.color;
+ Color c = graphic.color;
c.a = alpha;
- target.color = c;
+ graphic.color = c;
}
}
|