using cfg.ShowCfg; using Sirenix.OdinInspector; using System.Collections.Generic; using UnityEngine; /// /// 抽卡演出组件 /// public sealed class RaffleShowComponent : MonoBehaviour { #region 外部序列化字段 /// /// 角色根节点 /// [LabelText("角色根节点")] [SerializeField] private Transform tsCharacterRoot; /// /// 角色演出点根节点 /// [LabelText("角色演出点根节点")] [SerializeField] private Transform tsCharacterShowPointRoot; #endregion private readonly E_ShowSceneType showSceneTyp = E_ShowSceneType.Raffle; public E_ShowSceneType ShowSceneTyp { get { return showSceneTyp; } } /// /// 角色根节点 /// public Transform TsCharacterRoot { get { return tsCharacterRoot; } } #if UNITY_EDITOR /// /// 演出点根节点 /// public Transform TsShowPointRoot { get { return tsCharacterShowPointRoot; } } #endif /// /// 获取演出点 /// /// public void GetShowPoint(ref List listTsShowPoint) { listTsShowPoint.Clear(); if (tsCharacterShowPointRoot is null) return; listTsShowPoint = new(tsCharacterShowPointRoot.childCount); for (int i = 0; i < tsCharacterShowPointRoot.childCount; ++i) { listTsShowPoint.Add(tsCharacterShowPointRoot.GetChild(i)); } } }