diff options
author | chai <chaifix@163.com> | 2021-05-30 11:05:38 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-05-30 11:05:38 +0800 |
commit | 3bd21c73384906267a2a4c48acdb96df77bd1f67 (patch) | |
tree | 5f55740506d64f4bcc6fe0bc32b9a26c5e6da8b6 /Assets/UI_Extension/Scripts/Animation/Tween/TweenModule_Alpha.cs | |
parent | 26e4dc3a35d9c778684388de1af8b3f288fe627d (diff) |
*tween
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;
}
}
|