| | |
| | | // 动画相关 |
| | | [SerializeField] public UIAnimationType openAnimationType = UIAnimationType.None; |
| | | [SerializeField] public UIAnimationType closeAnimationType = UIAnimationType.None; |
| | | [SerializeField] protected RectTransform _rectTransform; //界面默认添加根节点用于表现界面开启关闭动画 |
| | | [SerializeField] protected RectTransform _rectTransform; //界面默认添加根节点用于表现界面开启关闭动画,或者设置适配用 |
| | | |
| | | [SerializeField]/*[HideInInspector]*/ public float animeDuration = 0.2f; |
| | | [SerializeField]public TweenCurve scaleOverInOutCurve; |
| | |
| | | // 运行时状态 |
| | | [HideInInspector] public int lastUsedRound = 0; |
| | | [HideInInspector] public UIBase parentUI; |
| | | |
| | | [HideInInspector] public GameObject rootNode; // 根节点 |
| | | |
| | | // 子UI管理 |
| | | [HideInInspector] public List<UIBase> childrenUI = new List<UIBase>(); |
| | |
| | | // 打开UI |
| | | public void HandleOpen() |
| | | { |
| | | if (_rectTransform == null) |
| | | { |
| | | Debug.LogError($"界面: {uiName} 需要设置根节点_rectTransform "); |
| | | return; |
| | | } |
| | | |
| | | OnPreOpen(); |
| | | // 如果正在播放动画,先停止 |
| | | StopCurrentAnimation(); |