fix new live error, add live Lyrics ui

This commit is contained in:
CroakFang
2023-08-28 00:57:47 +08:00
parent 3cbe760b84
commit 070b005216
16 changed files with 698 additions and 198 deletions
@@ -380,6 +380,7 @@ namespace Gallop.Live.Cutt
SetupFacialUpdateInfo_Eyebrow(ref updateInfo, facialDataList.eyebrowKeys, liveTime);
SetupFacialUpdateInfo_Ear(ref updateInfo, facialDataList.earKeys, liveTime);
SetupFacialUpdateInfo_EyeTrack(ref updateInfo, facialDataList.eyeTrackKeys, liveTime);
SetupFacialUpdateInfo_Effect(ref updateInfo, facialDataList.effectKeys, liveTime);
this.OnUpdateFacial(updateInfo, liveTime, 0);
}
@@ -391,6 +392,7 @@ namespace Gallop.Live.Cutt
SetupFacialUpdateInfo_Eyebrow(ref updateInfo, otherFacialDataList[i].eyebrowKeys, liveTime);
SetupFacialUpdateInfo_Ear(ref updateInfo, otherFacialDataList[i].earKeys, liveTime);
SetupFacialUpdateInfo_EyeTrack(ref updateInfo, otherFacialDataList[i].eyeTrackKeys, liveTime);
SetupFacialUpdateInfo_Effect(ref updateInfo, otherFacialDataList[i].effectKeys, liveTime);
this.OnUpdateFacial(updateInfo, liveTime, i+1);
}
}
@@ -435,6 +437,20 @@ namespace Gallop.Live.Cutt
}
}
private void SetupFacialUpdateInfo_Effect(ref FacialDataUpdateInfo updateInfo, LiveTimelineKeyFacialEffectDataList keys, float time)
{
LiveTimelineKey liveTimelineKey = null;
LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time);
if (curKey != null)
{
liveTimelineKey = curKey.key;
updateInfo.effect = liveTimelineKey as LiveTimelineKeyFacialEffectData;
updateInfo.effectKeyIndex = curKey.index;
}
}
private void SetupFacialUpdateInfo_Eyebrow(ref FacialDataUpdateInfo updateInfo, LiveTimelineKeyFacialEyebrowDataList keys, float time)
{
LiveTimelineKey liveTimelineKey = null;
@@ -129,7 +129,7 @@ namespace Gallop.Live.Cutt
public int cheekType;
public int tearyType;
public int tearfulType;
public LiveTimelineKeyFacialEffectData.TeardropConfig[] teardropConfigs;
public TeardropConfig[] teardropConfigs;
public int mangameIndex;
}
@@ -559,18 +559,10 @@ namespace Gallop.Live
public void InitializeMusic(int songid, List<LiveCharacterSelect> characters)
{
Debug.Log(songid);
int singer = 3;
if (_soloMode)
{
singer = 1;
}
for (int i = 0; i < characters.Count; i++)
{
if (characters[i].CharaEntry.Name != "" && i < 3)
if (characters[i].CharaEntry.Name != "" && i < partInfo.SingerCount)
{
var charaid = characters[i].CharaEntry.Id;
@@ -591,13 +583,13 @@ namespace Gallop.Live
if (entry != null)
{
Debug.Log(entry.Name);
liveVocal.Add(UmaViewerAudio.ApplySound(entry.Name.Split('.')[0]));
liveVocal.Add(UmaViewerAudio.ApplySound(entry.Name.Split('.')[0], i));
}
}
}
liveMusic = UmaViewerAudio.ApplySound(string.Format(SONG_PATH, songid));
liveMusic = UmaViewerAudio.ApplySound(string.Format(SONG_PATH, songid), -1);
}
public void Play()
@@ -725,6 +717,7 @@ namespace Gallop.Live
OnTimelineUpdate(_liveCurrentTime);
}
}
UpdateMainCamera();
}
}
@@ -737,6 +730,11 @@ namespace Gallop.Live
}
}
private void FixedUpdate()
{
LiveViewerUI.Instance.UpdateLyrics(_liveCurrentTime);
}
DateTime ExitTime;
private void ExitLive()
{