ui changes

This commit is contained in:
2024-05-02 16:31:37 +01:00
parent da19f51976
commit e43c2b83ee
9 changed files with 108 additions and 84 deletions

View File

@@ -78,6 +78,7 @@ public class CameraManager : MonoBehaviour
private void CameraControllerInput(){
var count = 0;
if(Input.GetKeyDown(KeyCode.LeftArrow)){
if (m_CameraIndex != 0)
m_CameraIndex--;
@@ -89,7 +90,7 @@ public class CameraManager : MonoBehaviour
}
for(int i = 0 + (m_CameraIndex * 10); i < m_CameraObjects.Count; i++){
for(int i = 0 + (m_CameraIndex * 10); i < m_CameraObjects.Count + 1; i++){
if(Input.GetKeyDown(KeyCode.Alpha0 + ( i - ( m_CameraIndex * 10 ) ))){
foreach(GameObject obj in m_CameraObjects){
if(count == i){

View File

@@ -59,7 +59,7 @@ public class ModelManager : MonoBehaviour
private void LoadLocalModels()
{
DirectoryInfo dirInfo = new DirectoryInfo(Path.Combine(Application.dataPath, m_DirectoryPath));
DirectoryInfo dirInfo = new DirectoryInfo("C:\\Users\\caile\\Desktop\\onnx");
FileInfo[] nnList = dirInfo.GetFiles("*.onnx");
// Sort files by filename (assuming filenames are numeric)
Array.Sort(nnList, (x, y) => {

View File

@@ -95,22 +95,22 @@ public class SubtitleManager : MonoBehaviour
if (Random.Range(0f, 10f) > 6) earlyStop = true;
yield return new WaitForSecondsRealtime(0);
m_Text.text = sentence;
//m_Text.text = sentence;
//foreach (char c in sentence.ToCharArray())
//{
// index++;
// m_Text.text += c;
// float randomInterval = Random.Range(0.02f, 0.06f);
// yield return new WaitForSecondsRealtime(randomInterval);
// m_TimeElapsed += randomInterval;
foreach (char c in sentence.ToCharArray())
{
index++;
m_Text.text += c;
float randomInterval = Random.Range(0.02f, 0.06f);
yield return new WaitForSecondsRealtime(randomInterval);
m_TimeElapsed += randomInterval;
// // Stop audio early based on probability
// if (randomStoppingValue == index && earlyStop)
// {
// AudioManager.instance.StopSound(m_NarrationSFXInst);
// }
//}
// Stop audio early based on probability
if (randomStoppingValue == index && earlyStop)
{
AudioManager.instance.StopSound(m_NarrationSFXInst);
}
}
StartCoroutine(ClearText(waitTime, false));
}