Add Live Effect track (track ID 60) implementation
- LiveTimelineEffectData.cs: new data class with full field set
(color, offset, owner, occurrenceSpot, IsLinkOwner*, etc.)
derived from actual cutt asset bundle TypeTree dump
- LiveTimelineWorkSheet: add effectList field
- LiveTimelineControl: add OnUpdateEffect event and AlterUpdate_EffectControl
- Director: add OnEffectUpdate handler and ApplyEffectTransform helper
loads prefab from 3d/effect/live/pfb_{name}, instantiates per key frame
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,8 @@ namespace Gallop.Live.Cutt
|
||||
|
||||
public event ObjectUpdateInfoDelegate OnUpdateObject;
|
||||
|
||||
public event Action<LiveTimelineEffectData, LiveTimelineKeyEffectData> OnUpdateEffect;
|
||||
|
||||
private static Func<LiveTimelineKeyCameraPositionData, LiveTimelineControl, FindTimelineConfig, Vector3> fnGetCameraPosValue = GetCameraPosValue;
|
||||
|
||||
private static Func<LiveTimelineKeyCameraLookAtData, LiveTimelineControl, Vector3, FindTimelineConfig, Vector3> fnGetCameraLookAtValue = GetCameraLookAtValue;
|
||||
@@ -341,6 +343,7 @@ namespace Gallop.Live.Cutt
|
||||
AlterUpdate_BgColor1(workSheet, _currentFrame);
|
||||
AlterUpdate_TransformControl(workSheet, _currentFrame);
|
||||
AlterUpdate_ObjectControl(workSheet, _currentFrame);
|
||||
AlterUpdate_EffectControl(workSheet, _currentFrame);
|
||||
|
||||
_isNowAlterUpdate = false;
|
||||
|
||||
@@ -618,7 +621,7 @@ namespace Gallop.Live.Cutt
|
||||
|
||||
|
||||
|
||||
//修改(Live演出的显隐控制和位置变换相关)
|
||||
//��(Live�ݳ����������ƺ�λ�ñ任���)
|
||||
public void LateUpdateFormationOffset_Transform(int targetIndex, LiveTimelineKeyIndex curKeyIndex, float time)
|
||||
{
|
||||
bool ControlMode = UmaViewerUI.Instance != null && UmaViewerUI.Instance.isControlMode;
|
||||
@@ -1158,7 +1161,7 @@ namespace Gallop.Live.Cutt
|
||||
{
|
||||
camera.cacheTransform.position = pos;
|
||||
|
||||
// TODO 这里用的还是CGSS的layer枚举,要进行替换
|
||||
// TODO �����õĻ���CGSS��layerö�٣�Ҫ�����滻
|
||||
/*
|
||||
int num = liveTimelineKeyCameraPositionData.GetCullingMask();
|
||||
if (num == 0)
|
||||
@@ -1823,6 +1826,22 @@ namespace Gallop.Live.Cutt
|
||||
}
|
||||
}
|
||||
|
||||
private void AlterUpdate_EffectControl(LiveTimelineWorkSheet sheet, float currentFrame)
|
||||
{
|
||||
if (sheet.effectList == null || OnUpdateEffect == null) return;
|
||||
int count = sheet.effectList.Count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
var effectData = sheet.effectList[i];
|
||||
var keys = effectData.keys;
|
||||
if (keys == null || keys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !keys.EnablePlayModeTimeline(_playMode))
|
||||
continue;
|
||||
FindTimelineKey(out var curKey, out var _, keys, currentFrame);
|
||||
if (curKey == null) continue;
|
||||
OnUpdateEffect.Invoke(effectData, curKey as LiveTimelineKeyEffectData);
|
||||
}
|
||||
}
|
||||
|
||||
private static float LerpWithoutClamp(float a, float b, float t)
|
||||
{
|
||||
return a + (b - a) * t;
|
||||
|
||||
Reference in New Issue
Block a user