using UnityEngine; using UnityEngine.UI; namespace AlicizaX.AnimationFlow.Runtime { [Category("Property")] public class GraphicAlpha : ActionNode { public Graphic target; public float alpha; protected float orgValue; public override void OnInit() { orgValue = target.color.a; } public override void OnReset() { target.color = new Color(target.color.r, target.color.g, target.color.b, orgValue); } public override void OnEnter() { target.color = new Color(target.color.r, target.color.g, target.color.b, alpha); } public override bool Valid() { return target != null; } public override bool HasSubTitle() { return true; } public override string SubTitle() { return target != null ? target.name : null; } } }