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

68 lines
1.7 KiB
C#

using cfg.ShowCfg;
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 扫荡演出组件
/// </summary>
public sealed class SweepShowComponent : MonoBehaviour
{
#region 外部序列化字段
[LabelText("模型根节点")]
[SerializeField]
private Transform tsModelRoot;
[LabelText("角色演出点根节点")]
[SerializeField]
private Transform tsCharacterShowPointRoot;
[LabelText("Timeline节点")]
[SerializeField]
private GameObject goTimeline;
#endregion
/// <summary>
/// 演出场景类型
/// </summary>
private readonly E_ShowSceneType showSceneTyp = E_ShowSceneType.Sweep;
#region 属性
/// <summary>
/// 演出场景类型
/// </summary>
public E_ShowSceneType ShowSceneTyp
{
get { return showSceneTyp; }
}
/// <summary>
/// 模型根节点
/// </summary>
public Transform TsModelRoot { get { return tsModelRoot; } }
/// <summary>
/// Timeline节点
/// </summary>
public GameObject GoTimeline { get { return goTimeline; } }
#endregion
/// <summary>
/// 获取角色演出点
/// </summary>
/// <param name="listTsCharacterShowPoint"></param>
public void GetCharacterShowPoint(ref List<Transform> listTsCharacterShowPoint)
{
listTsCharacterShowPoint.Clear();
if (null == tsCharacterShowPointRoot)
return;
listTsCharacterShowPoint = new(tsCharacterShowPointRoot.childCount);
for (int i = 0; i < tsCharacterShowPointRoot.childCount; ++i)
{
listTsCharacterShowPoint.Add(tsCharacterShowPointRoot.GetChild(i));
}
}
}