1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using ChivaXR;
- using Sirenix.OdinInspector;
- using UnityEngine;
- using UnityEngine.UI;
- public class AniDriver_UIStatusSetting : AnimationDriverBase
- {
- [LabelText("是否可以进行交互")]
- [SerializeField]
- private bool m_IsInteractable;
- [BoxGroup("UI模块")]
- [SerializeField]
- private List<Selectable> m_AllSelectables = new List<Selectable>();
-
- public override void InitState()
- {
-
- }
- public override void FinishedState()
- {
- foreach (var item in m_AllSelectables)
- {
- if (item != null)
- {
- item.interactable = m_IsInteractable;
- }
- }
- }
- public override void StartPlay(Action finishedCallBack = null)
- {
- foreach (var item in m_AllSelectables)
- {
- item.interactable = m_IsInteractable;
- }
-
- finishedCallBack?.Invoke();
- }
- }
|