NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/GameWrapper/Show/RaffleShowComponent.cs

65 lines
1.6 KiB
C#

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