Fix BgColor2 dispatch and unify Director handler style
- Fix LiveTimelineBgColor2Data.keys type (BgColor1DataList → BgColor2DataList) - Add AlterUpdate_BgColor2 call and implementation in LiveTimelineControl - Subscribe OnUpdateBgColor2 in Director with ambient color handler - Extract all anonymous delegates in Director to named OnXxxUpdate methods - Add LIVE_TRACKS.md: full track reference table (IDs 0–102) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -354,6 +354,7 @@ namespace Gallop.Live.Cutt
|
||||
AlterUpdate_MultiCamera(workSheet, _currentFrame);
|
||||
AlterUpdate_GlobalLight(workSheet, _currentFrame);
|
||||
AlterUpdate_BgColor1(workSheet, _currentFrame);
|
||||
AlterUpdate_BgColor2(workSheet, _currentFrame);
|
||||
AlterUpdate_TransformControl(workSheet, _currentFrame);
|
||||
AlterUpdate_ObjectControl(workSheet, _currentFrame);
|
||||
AlterUpdate_EffectControl(workSheet, _currentFrame);
|
||||
@@ -1769,6 +1770,37 @@ namespace Gallop.Live.Cutt
|
||||
}
|
||||
}
|
||||
|
||||
private void AlterUpdate_BgColor2(LiveTimelineWorkSheet sheet, float currentFrame)
|
||||
{
|
||||
if (OnUpdateBgColor2 == null) return;
|
||||
int count = sheet.bgColor2List.Count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
LiveTimelineKeyBgColor2DataList keys = sheet.bgColor2List[i].keys;
|
||||
if (keys == null || keys.HasAttribute(LiveTimelineKeyDataListAttr.Disable) || !keys.EnablePlayModeTimeline(_playMode))
|
||||
continue;
|
||||
FindTimelineKey(out var curKey, out var nextKey, keys, currentFrame);
|
||||
if (curKey == null) continue;
|
||||
LiveTimelineKeyBgColor2Data d0 = curKey as LiveTimelineKeyBgColor2Data;
|
||||
LiveTimelineKeyBgColor2Data d1 = nextKey as LiveTimelineKeyBgColor2Data;
|
||||
BgColor2UpdateInfo updateInfo = default;
|
||||
if (d1 != null && d1.interpolateType != 0)
|
||||
{
|
||||
float t = CalculateInterpolationValue(d0, d1, currentFrame);
|
||||
updateInfo.color1 = Color.Lerp(d0.color1, d1.color1, t);
|
||||
updateInfo.color2 = Color.Lerp(d0.color2, d1.color2, t);
|
||||
updateInfo.value = Mathf.Lerp(d0.power, d1.power, t);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateInfo.color1 = d0.color1;
|
||||
updateInfo.color2 = d0.color2;
|
||||
updateInfo.value = d0.power;
|
||||
}
|
||||
OnUpdateBgColor2.Invoke(ref updateInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void AlterUpdate_TransformControl(LiveTimelineWorkSheet sheet, float currentFrame)
|
||||
{
|
||||
int count = sheet.transformList.Count;
|
||||
|
||||
Reference in New Issue
Block a user