From 3bd21c73384906267a2a4c48acdb96df77bd1f67 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 30 May 2021 11:05:38 +0800 Subject: *tween --- Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs') 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; } } -- cgit v1.1-26-g67d0