add live select pannel
This commit is contained in:
+50
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cutt
|
||||
{
|
||||
[Serializable]
|
||||
public class LiveTimelineKeyEventData : LiveTimelineKey
|
||||
{
|
||||
[Serializable]
|
||||
public class EventData
|
||||
{
|
||||
public LiveTimelineEventID eventId;
|
||||
|
||||
private CuttEventParamBase eventParam;
|
||||
|
||||
public string serializedParamter = "";
|
||||
|
||||
public TypeValue GetParameter<TypeValue>() where TypeValue : CuttEventParamBase
|
||||
{
|
||||
return eventParam as TypeValue;
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(serializedParamter) && LiveTimelineEventPublisher.paramGeneratorDict.TryGetValue(eventId, out var value))
|
||||
{
|
||||
eventParam = null;
|
||||
if (value != null)
|
||||
{
|
||||
eventParam = value.ToObject(serializedParamter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<EventData> eventList = new List<EventData>();
|
||||
|
||||
public override LiveTimelineKeyDataType dataType => LiveTimelineKeyDataType.Event;
|
||||
|
||||
public override void OnLoad(LiveTimelineControl timelineControl)
|
||||
{
|
||||
base.OnLoad(timelineControl);
|
||||
foreach (EventData @event in eventList)
|
||||
{
|
||||
@event.OnLoad();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user