mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-22 13:58:00 +01:00
34 lines
619 B
C#
34 lines
619 B
C#
using Fie.Voice;
|
|
using RogoDigital.Lipsync;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class FieLipSyncTest : MonoBehaviour
|
|
{
|
|
public FieVoiceController testTarget;
|
|
|
|
public List<LipSyncData> testDataList = new List<LipSyncData>();
|
|
|
|
private float interval = 3f;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (!testTarget.isPlaying)
|
|
{
|
|
if (interval > 0f)
|
|
{
|
|
interval -= Time.deltaTime;
|
|
}
|
|
else if (testDataList.Count >= 1)
|
|
{
|
|
int index = Random.Range(0, testDataList.Count);
|
|
testTarget.PlayWithLipSyncData(testDataList[index]);
|
|
interval = 3f;
|
|
}
|
|
}
|
|
}
|
|
}
|