simple progress bar

This commit is contained in:
左右看
2023-07-12 17:22:00 +08:00
parent 76c812431a
commit d1d1a2f771
13 changed files with 866 additions and 101 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2120fed729437c646b32dc359f984db6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.UI;
public class LiveViewerUI : MonoBehaviour
{
public static LiveViewerUI Instance;
public UnityEngine.UI.Slider ProgressBar;
private void Awake()
{
Instance = this;
//TrueProgressBar = (UnityEngine.UIElements.Slider)ProgressBar;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0d264e9377d3d9f4998e913092994486
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class SliderControl : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
public bool is_Touched = false;
public bool is_Outed = false;
public void OnPointerDown(PointerEventData eventData)
{
is_Touched = true;
Debug.Log("Dowm");
}
public void OnPointerUp(PointerEventData eventData)
{
is_Touched = false;
is_Outed = true;
Debug.Log("Up");
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 251eb16db8790644e8c7fb6ab2b73e24
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+2
View File
@@ -1,4 +1,5 @@
using CriWare;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@@ -48,6 +49,7 @@ public class UmaViewerAudio
static public void AlterUpdate(float _liveCurrentTime, PartEntry partInfo, List<CriAtomSource> liveVocal)
{
var timeLineData = partInfo.PartSettings["time"];
//need to improve
+1
View File
@@ -708,6 +708,7 @@ public class UmaViewerBuilder : MonoBehaviour
},
delegate ()
{
Gallop.Live.Director.instance.InitializeUI();
Gallop.Live.Director.instance.InitializeTimeline(characters, UI.LiveMode);
Gallop.Live.Director.instance.Play(live.MusicId, characters);
}
@@ -806,23 +806,15 @@ namespace Gallop
return morphs.Find(m => m.index == (int)Type);
}
private LiveTimelineKeyLipSyncData _prevLipKeyData;
private LiveTimelineKeyLipSyncData _lastLipKeyData;
public void AlterUpdateAutoLip(LiveTimelineKeyLipSyncData keyData_, float liveTime_, float _switch)
public void AlterUpdateAutoLip(LiveTimelineKeyLipSyncData _prevLipKeyData, LiveTimelineKeyLipSyncData keyData_, float liveTime_, float _switch)
{
//|| lockMouth
if (_switch == 0 || lockMouth)
{
_prevLipKeyData = null;
_lastLipKeyData = null;
return;
}
if(_lastLipKeyData != keyData_)
{
_prevLipKeyData = _lastLipKeyData;
}
float weightRatio = CalcMorphWeight(liveTime_, keyData_.time, keyData_.interpolateType, keyData_, null);
@@ -855,22 +847,8 @@ namespace Gallop
}
ChangeMorphMouth();
_lastLipKeyData = keyData_;
}
private LiveTimelineKeyFacialMouthData _prevMouthKeyData;
private LiveTimelineKeyFacialMouthData _lastMouthKeyData;
private LiveTimelineKeyFacialEyeData _prevEyesKeyData;
private LiveTimelineKeyFacialEyeData _lastEyesKeyData;
private LiveTimelineKeyFacialEyebrowData _prevEyebrowsKeyData;
private LiveTimelineKeyFacialEyebrowData _lastEyebrowsKeyData;
private LiveTimelineKeyFacialEarData _prevEarsKeyData;
private LiveTimelineKeyFacialEarData _lastEarsKeyData;
public bool lockMouth = false;
public void AlterUpdateFacialNew(ref FacialDataUpdateInfo updateInfo_, float liveTime_)
@@ -886,28 +864,24 @@ namespace Gallop
lockMouth = false;
}
if (_lastMouthKeyData != updateInfo_.mouthCur)
{
_prevMouthKeyData = _lastMouthKeyData;
}
float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.mouthCur.time, updateInfo_.mouthCur.interpolateType, updateInfo_.mouthCur, updateInfo_.mouthNext);
MouthMorphs.ForEach(morph => morph.weight = 0);
if (_prevMouthKeyData != null)
if (updateInfo_.mouthPrev != null)
{
if (weightRatio != 1)
{
foreach (var part in _prevMouthKeyData.facialPartsDataArray)
foreach (var part in updateInfo_.mouthPrev.facialPartsDataArray)
{
if (part.FacialPartsId == 0) { continue; }
MouthMorphs[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevMouthKeyData.weight / 100);
MouthMorphs[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.mouthPrev.weight / 100);
}
}
else
{
foreach (var part in _prevMouthKeyData.facialPartsDataArray)
foreach (var part in updateInfo_.mouthPrev.facialPartsDataArray)
{
if (part.FacialPartsId == 0) { continue; }
MouthMorphs[part.FacialPartsId - 1].weight = 0;
@@ -923,42 +897,37 @@ namespace Gallop
ChangeMorphMouth();
_lastMouthKeyData = updateInfo_.mouthCur;
}
if (updateInfo_.eyeCur != null)
{
if (_lastEyesKeyData != updateInfo_.eyeCur)
{
_prevEyesKeyData = _lastEyesKeyData;
}
float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.eyeCur.time, updateInfo_.eyeCur.interpolateType, updateInfo_.eyeCur, updateInfo_.eyeNext);
EyeMorphs.ForEach(morph => morph.weight = 0);
if (_prevEyesKeyData != null)
if (updateInfo_.eyePrev != null)
{
if (weightRatio != 1)
{
foreach (var part in _prevEyesKeyData.facialPartsDataArrayL)
foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayL)
{
if (part.FacialPartsId == 0) { continue; }
leftEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyesKeyData.weight / 100);
leftEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyePrev.weight / 100);
}
foreach (var part in _prevEyesKeyData.facialPartsDataArrayR)
foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayR)
{
if (part.FacialPartsId == 0) { continue; }
rightEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyesKeyData.weight / 100);
rightEyeMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyePrev.weight / 100);
}
}
else
{
foreach (var part in _prevEyesKeyData.facialPartsDataArrayL)
foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayL)
{
if (part.FacialPartsId == 0) { continue; }
leftEyeMorph[part.FacialPartsId - 1].weight = 0;
}
foreach (var part in _prevEyesKeyData.facialPartsDataArrayR)
foreach (var part in updateInfo_.eyePrev.facialPartsDataArrayR)
{
if (part.FacialPartsId == 0) { continue; }
rightEyeMorph[part.FacialPartsId - 1].weight = 0;
@@ -979,43 +948,38 @@ namespace Gallop
ChangeMorphEye();
_lastEyesKeyData = updateInfo_.eyeCur;
}
if (updateInfo_.eyebrowCur != null)
{
if (_lastEyebrowsKeyData != updateInfo_.eyebrowCur)
{
_prevEyebrowsKeyData = _lastEyebrowsKeyData;
}
float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.eyebrowCur.time, updateInfo_.eyebrowCur.interpolateType, updateInfo_.eyebrowCur, updateInfo_.eyebrowNext);
EyeBrowMorphs.ForEach(morph => morph.weight = 0);
if (_prevEyebrowsKeyData != null)
if (updateInfo_.eyebrowPrev != null)
{
if (weightRatio != 1)
{
foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayL)
foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayL)
{
if (part.FacialPartsId == 0) { continue; }
leftEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyebrowsKeyData.weight / 100);
leftEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyebrowPrev.weight / 100);
}
foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayR)
foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayR)
{
if (part.FacialPartsId == 0) { continue; }
rightEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)_prevEyebrowsKeyData.weight / 100);
rightEyebrowMorph[part.FacialPartsId - 1].weight = ((float)part.WeightPer / 100 * (1 - weightRatio)) * ((float)updateInfo_.eyebrowPrev.weight / 100);
}
}
else
{
foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayL)
foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayL)
{
if (part.FacialPartsId == 0) { continue; }
leftEyebrowMorph[part.FacialPartsId - 1].weight = 0;
}
foreach (var part in _prevEyebrowsKeyData.facialPartsDataArrayR)
foreach (var part in updateInfo_.eyebrowPrev.facialPartsDataArrayR)
{
if (part.FacialPartsId == 0) { continue; }
rightEyebrowMorph[part.FacialPartsId - 1].weight = 0;
@@ -1036,48 +1000,43 @@ namespace Gallop
ChangeMorphEyebrow();
_lastEyebrowsKeyData = updateInfo_.eyebrowCur;
}
if (updateInfo_.earCur != null)
{
if (_lastEarsKeyData != updateInfo_.earCur)
{
_prevEarsKeyData = _lastEarsKeyData;
}
float weightRatio = CalcMorphWeight(liveTime_, updateInfo_.earCur.time, updateInfo_.earCur.interpolateType, updateInfo_.earCur, updateInfo_.earNext);
EarMorphs.ForEach(morph => morph.weight = 0);
if (_prevEarsKeyData != null)
if (updateInfo_.earPrev != null)
{
if (weightRatio != 1)
{
var partL = _prevEarsKeyData.facialEarIdL;
var partL = updateInfo_.earPrev.facialEarIdL;
if (partL != 0)
{
leftEarMorph[partL - 1].weight = (((1 - weightRatio)) * ((float)_prevEarsKeyData.weight / 100));
leftEarMorph[partL - 1].weight = (((1 - weightRatio)) * ((float)updateInfo_.earPrev.weight / 100));
}
var partR = _prevEarsKeyData.facialEarIdR;
var partR = updateInfo_.earPrev.facialEarIdR;
if (partR != 0)
{
rightEarMorph[partR - 1].weight = (((1 - weightRatio)) * ((float)_prevEarsKeyData.weight / 100));
rightEarMorph[partR - 1].weight = (((1 - weightRatio)) * ((float)updateInfo_.earPrev.weight / 100));
}
}
else
{
var partL = _prevEarsKeyData.facialEarIdL;
var partL = updateInfo_.earPrev.facialEarIdL;
if (partL != 0)
{
leftEarMorph[partL - 1].weight = 0;
}
var partR = _prevEarsKeyData.facialEarIdR;
var partR = updateInfo_.earPrev.facialEarIdR;
if (partR != 0)
{
@@ -1102,7 +1061,6 @@ namespace Gallop
ChangeMorphEar();
_lastEarsKeyData = updateInfo_.earCur;
}
}
@@ -7,15 +7,20 @@ namespace Gallop.Live.Cutt
public struct FacialDataUpdateInfo // TypeDefIndex: 29410
{
// Fields
public LiveTimelineKeyFacialFaceData facePrev; // 0x0
public LiveTimelineKeyFacialFaceData faceCur; // 0x0
public LiveTimelineKeyFacialFaceData faceNext; // 0x8
public LiveTimelineKeyFacialMouthData mouthPrev; // 0x10
public LiveTimelineKeyFacialMouthData mouthCur; // 0x10
public LiveTimelineKeyFacialMouthData mouthNext; // 0x10
public LiveTimelineKeyFacialEyeData eyePrev; // 0x18
public LiveTimelineKeyFacialEyeData eyeCur; // 0x18
public LiveTimelineKeyFacialEyeData eyeNext; // 0x20
public LiveTimelineKeyFacialEyebrowData eyebrowPrev; // 0x28
public LiveTimelineKeyFacialEyebrowData eyebrowCur; // 0x28
public LiveTimelineKeyFacialEyebrowData eyebrowNext; // 0x28
public LiveTimelineKeyFacialEyeTrackData eyeTrack; // 0x30
public LiveTimelineKeyFacialEarData earPrev; // 0x38
public LiveTimelineKeyFacialEarData earCur; // 0x38
public LiveTimelineKeyFacialEarData earNext; // 0x38
public LiveTimelineKeyFacialEffectData effect; // 0x40
@@ -28,7 +28,7 @@ namespace Gallop.Live.Cutt
public LiveTimelineKeyCharaMotionSeqDataList[] _keyArray;
public event Action<LiveTimelineKeyLipSyncData, float> OnUpdateLipSync;
public event Action<LiveTimelineKeyIndex, float> OnUpdateLipSync;
public event Action<FacialDataUpdateInfo, float, int> OnUpdateFacial;
@@ -166,14 +166,18 @@ namespace Gallop.Live.Cutt
{
LiveTimelineKey liveTimelineKey = null;
LiveTimelineKey liveTimelineKey2 = null;
LiveTimelineKey liveTimelineKey3 = null;
LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time);
if (curKey != null)
{
liveTimelineKey = curKey.key;
liveTimelineKey2 = curKey.nextKey;
updateInfo.mouthCur = liveTimelineKey as LiveTimelineKeyFacialMouthData;
updateInfo.mouthNext = liveTimelineKey2 as LiveTimelineKeyFacialMouthData;
liveTimelineKey = curKey.prevKey;
liveTimelineKey2 = curKey.key;
liveTimelineKey3 = curKey.nextKey;
updateInfo.mouthPrev = liveTimelineKey as LiveTimelineKeyFacialMouthData;
updateInfo.mouthCur = liveTimelineKey2 as LiveTimelineKeyFacialMouthData;
updateInfo.mouthNext = liveTimelineKey3 as LiveTimelineKeyFacialMouthData;
updateInfo.mouthKeyIndex = curKey.index;
}
}
@@ -182,14 +186,18 @@ namespace Gallop.Live.Cutt
{
LiveTimelineKey liveTimelineKey = null;
LiveTimelineKey liveTimelineKey2 = null;
LiveTimelineKey liveTimelineKey3 = null;
LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time);
if (curKey != null)
{
liveTimelineKey = curKey.key;
liveTimelineKey2 = curKey.nextKey;
updateInfo.eyeCur = liveTimelineKey as LiveTimelineKeyFacialEyeData;
updateInfo.eyeNext = liveTimelineKey2 as LiveTimelineKeyFacialEyeData;
liveTimelineKey = curKey.prevKey;
liveTimelineKey2 = curKey.key;
liveTimelineKey3 = curKey.nextKey;
updateInfo.eyePrev = liveTimelineKey as LiveTimelineKeyFacialEyeData;
updateInfo.eyeCur = liveTimelineKey2 as LiveTimelineKeyFacialEyeData;
updateInfo.eyeNext = liveTimelineKey3 as LiveTimelineKeyFacialEyeData;
updateInfo.eyeKeyIndex = curKey.index;
}
}
@@ -198,14 +206,18 @@ namespace Gallop.Live.Cutt
{
LiveTimelineKey liveTimelineKey = null;
LiveTimelineKey liveTimelineKey2 = null;
LiveTimelineKey liveTimelineKey3 = null;
LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time);
if (curKey != null)
{
liveTimelineKey = curKey.key;
liveTimelineKey2 = curKey.nextKey;
updateInfo.eyebrowCur = liveTimelineKey as LiveTimelineKeyFacialEyebrowData;
updateInfo.eyebrowNext = liveTimelineKey2 as LiveTimelineKeyFacialEyebrowData;
liveTimelineKey = curKey.prevKey;
liveTimelineKey2 = curKey.key;
liveTimelineKey3 = curKey.nextKey;
updateInfo.eyebrowPrev = liveTimelineKey as LiveTimelineKeyFacialEyebrowData;
updateInfo.eyebrowCur = liveTimelineKey2 as LiveTimelineKeyFacialEyebrowData;
updateInfo.eyebrowNext = liveTimelineKey3 as LiveTimelineKeyFacialEyebrowData;
updateInfo.eyebrowKeyIndex = curKey.index;
}
}
@@ -214,14 +226,18 @@ namespace Gallop.Live.Cutt
{
LiveTimelineKey liveTimelineKey = null;
LiveTimelineKey liveTimelineKey2 = null;
LiveTimelineKey liveTimelineKey3 = null;
LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time);
if (curKey != null)
{
liveTimelineKey = curKey.key;
liveTimelineKey2 = curKey.nextKey;
updateInfo.earCur = liveTimelineKey as LiveTimelineKeyFacialEarData;
updateInfo.earNext = liveTimelineKey2 as LiveTimelineKeyFacialEarData;
liveTimelineKey = curKey.prevKey;
liveTimelineKey2 = curKey.key;
liveTimelineKey3 = curKey.nextKey;
updateInfo.earPrev = liveTimelineKey as LiveTimelineKeyFacialEarData;
updateInfo.earCur = liveTimelineKey2 as LiveTimelineKeyFacialEarData;
updateInfo.earNext = liveTimelineKey3 as LiveTimelineKeyFacialEarData;
updateInfo.earKeyIndex = curKey.index;
}
}
@@ -234,8 +250,7 @@ namespace Gallop.Live.Cutt
if (curKey != null && curKey.index != -1)
{
LiveTimelineKeyLipSyncData arg = curKey.key as LiveTimelineKeyLipSyncData;
this.OnUpdateLipSync(arg, liveTime);
this.OnUpdateLipSync(curKey, liveTime);
}
}
@@ -279,7 +294,7 @@ namespace Gallop.Live.Cutt
{
LiveTimelineKeyIndex curKey = keys.TimeKeyIndex;
if (curKey.index == -1)
if (curKey.index == -1 || Director.instance.sliderControl.is_Touched)
{
FindTimelineKeyCurrent(out curKey, keys, curTime);
}
@@ -160,6 +160,14 @@ namespace Gallop.Live.Cutt
else
{
thisTimeKeyIndex.nextKey = null;
}
if(i-1 >= 0)
{
thisTimeKeyIndex.prevKey = thisList[i - 1];
}
else
{
thisTimeKeyIndex.prevKey = null;
}
return thisTimeKeyIndex;
}
@@ -182,6 +190,14 @@ namespace Gallop.Live.Cutt
else
{
thisTimeKeyIndex.nextKey = null;
}
if(thisTimeKeyIndex.index - 1 >= 0)
{
thisTimeKeyIndex.prevKey = thisList[thisTimeKeyIndex.index - 1];
}
else
{
thisTimeKeyIndex.prevKey = null;
}
}
}
@@ -195,6 +211,7 @@ namespace Gallop.Live.Cutt
public class LiveTimelineKeyIndex
{
public int index = -1;
public LiveTimelineKey prevKey = null;
public LiveTimelineKey key = null;
public LiveTimelineKey nextKey = null;
}
@@ -6,6 +6,8 @@ using System.Linq;
using Gallop.Live.Cutt;
using CriWare;
using UnityEngine.SceneManagement;
using UnityEngine.UIElements;
using UnityEngine.SocialPlatforms;
namespace Gallop.Live
{
@@ -322,7 +324,7 @@ namespace Gallop.Live
public bool _isLiveScene;
public AudioSource liveSong;
public AudioSource[] liveSong;
public List<CriAtomSource> liveVocal;
public CriAtomSource liveMusic;
@@ -337,6 +339,12 @@ namespace Gallop.Live
public int liveMode = 0;
public LiveViewerUI UI;
public float totalTime;
public SliderControl sliderControl;
private void Awake()
{
if (live != null)
@@ -374,8 +382,18 @@ namespace Gallop.Live
}
}
public void InitializeUI()
{
UI = GameObject.Find("LiveUI").GetComponent<LiveViewerUI>();
sliderControl = UI.ProgressBar.GetComponent<SliderControl>();
}
public void InitializeTimeline(List<LiveCharacterSelect> characters, int mode)
{
totalTime = _liveTimelineControl.data.timeLength;
liveMode = mode;
allowCount = characters.Count;
@@ -394,14 +412,17 @@ namespace Gallop.Live
_liveTimelineControl.InitCharaMotionSequence(_liveTimelineControl.data.characterSettings.motionSequenceIndices);
_liveTimelineControl.OnUpdateLipSync += delegate (LiveTimelineKeyLipSyncData keyData_, float liveTime_)
_liveTimelineControl.OnUpdateLipSync += delegate (LiveTimelineKeyIndex keyData_, float liveTime_)
{
var prevKey = keyData_.prevKey as LiveTimelineKeyLipSyncData;
var curKey = keyData_.key as LiveTimelineKeyLipSyncData;
var nextKey = keyData_.nextKey as LiveTimelineKeyLipSyncData;
for (int k = 0; k < charaObjs.Count; k++)
{
var container = charaObjs[k].GetComponentInChildren<UmaContainer>();
if(container != null)
{
container.FaceDrivenKeyTarget.AlterUpdateAutoLip(keyData_, liveTime_, ((int)keyData_.character >> k) % 2);
container.FaceDrivenKeyTarget.AlterUpdateAutoLip(prevKey, curKey, liveTime_, ((int)curKey.character >> k) % 2);
}
}
};
@@ -479,7 +500,7 @@ namespace Gallop.Live
}
UmaViewerBuilder.Instance.LoadLiveSound(songid, entry, false);
liveSong = GameObject.Find("SoundController").GetComponent<AudioSource>();
liveSong = GameObject.Find("SoundController").GetComponents<AudioSource>();
}
_isLiveSetup = true;
@@ -530,19 +551,82 @@ namespace Gallop.Live
}
else
{
if(liveSong.time > 0.1)
if (liveSong[0].time > 0.1)
{
_liveCurrentTime = liveSong.time;
_liveCurrentTime = liveSong[0].time;
_syncTime = true;
}
}
}
else
{
_liveCurrentTime += Time.deltaTime;
//Debug.Log((float)liveMusic.time / 1000);
//Debug.Log(_liveCurrentTime);
OnTimelineUpdate(_liveCurrentTime);
if (sliderControl.is_Outed)
{
_liveCurrentTime = UI.ProgressBar.value * totalTime;
if (liveMusic)
{
int CriTime = Convert.ToInt32(_liveCurrentTime * 1000);
liveMusic.startTime = CriTime;
foreach (var vocal in liveVocal)
{
vocal.startTime = CriTime;
}
liveMusic.Play(0);
foreach (var vocal in liveVocal)
{
vocal.Play(0);
}
}
else
{
foreach (var song in liveSong)
{
song.time = _liveCurrentTime;
}
}
OnTimelineUpdate(_liveCurrentTime);
sliderControl.is_Outed = false;
sliderControl.is_Touched = false;
_syncTime = false;
}
else if (sliderControl.is_Touched)
{
_liveCurrentTime = UI.ProgressBar.value * totalTime;
if (liveMusic)
{
liveMusic.Stop();
foreach (var vocal in liveVocal)
{
vocal.Stop();
}
}
else
{
foreach(var song in liveSong)
{
song.Stop();
}
}
OnTimelineUpdate(_liveCurrentTime);
}
else
{
_liveCurrentTime += Time.deltaTime;
UI.ProgressBar.value = _liveCurrentTime / totalTime;
//Debug.Log((float)liveMusic.time / 1000);
//Debug.Log(_liveCurrentTime);
OnTimelineUpdate(_liveCurrentTime);
}
}
}
}