From 37674424a68f6ab9d05c7db6187e73445212d608 Mon Sep 17 00:00:00 2001 From: cailean Date: Thu, 4 Apr 2024 14:59:38 +0100 Subject: [PATCH] subtitle update --- .../8_Scripts/1_Managers/SubtitleManager.cs | 32 ++++++++++--------- .../ML-Agents/Timers/DreconDemo_timers.json | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Assets/8_Scripts/1_Managers/SubtitleManager.cs b/Assets/8_Scripts/1_Managers/SubtitleManager.cs index 62c2b2c..86ad202 100644 --- a/Assets/8_Scripts/1_Managers/SubtitleManager.cs +++ b/Assets/8_Scripts/1_Managers/SubtitleManager.cs @@ -67,7 +67,6 @@ public class SubtitleManager : MonoBehaviour offset = Random.Range(5f, 7f); } - Debug.Log($"offset{offset}, wt{waitTime}"); float earlyOffset = 0; if (!earlyStop) @@ -90,21 +89,24 @@ public class SubtitleManager : MonoBehaviour bool earlyStop = false; if (Random.Range(0f, 10f) > 6) earlyStop = true; + yield return new WaitForSecondsRealtime(0); - foreach (char c in sentence.ToCharArray()) - { - index++; - m_Text.text += c; - float randomInterval = Random.Range(0.001f, 0.002f); - yield return new WaitForSecondsRealtime(randomInterval); - m_TimeElapsed += randomInterval; - - // Stop audio early based on probability - if (randomStoppingValue == index && earlyStop) - { - //AudioManager.instance.StopSound(m_NarrationSFXInst); - } - } + m_Text.text = sentence; + + //foreach (char c in sentence.ToCharArray()) + //{ + // index++; + // m_Text.text += c; + // float randomInterval = Random.Range(0, 0f); + // yield return new WaitForSecondsRealtime(randomInterval); + // m_TimeElapsed += randomInterval; + + // // Stop audio early based on probability + // if (randomStoppingValue == index && earlyStop) + // { + // //AudioManager.instance.StopSound(m_NarrationSFXInst); + // } + //} StartCoroutine(ClearText(waitTime, false)); } diff --git a/Assets/ML-Agents/Timers/DreconDemo_timers.json b/Assets/ML-Agents/Timers/DreconDemo_timers.json index 21c46dd..3bfd79d 100644 --- a/Assets/ML-Agents/Timers/DreconDemo_timers.json +++ b/Assets/ML-Agents/Timers/DreconDemo_timers.json @@ -1 +1 @@ -{"count":1,"self":14.925488,"total":15.3567591,"children":{"InitializeActuators":{"count":1,"self":0.0010115,"total":0.0010115,"children":null},"InitializeSensors":{"count":1,"self":0.0010003,"total":0.0010003,"children":null},"AgentSendState":{"count":769,"self":0.0040076999999999995,"total":0.0987039,"children":{"CollectObservations":{"count":385,"self":0.08215829999999999,"total":0.08215829999999999,"children":null},"WriteActionMask":{"count":385,"self":0.0009993,"total":0.0009993,"children":null},"RequestDecision":{"count":385,"self":0.0115386,"total":0.0115386,"children":null}}},"DecideAction":{"count":769,"self":0.2014501,"total":0.2014501,"children":null},"AgentAct":{"count":769,"self":0.1291049,"total":0.1291049,"children":null}},"gauges":{"DReCon-v0.CumulativeReward":{"count":1,"max":58.17516,"min":58.17516,"runningAverage":58.17516,"value":58.17516,"weightedAverage":58.17516}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712237404","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Drecon2022 -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId f88630f1-920b-4dbe-b665-558da63c889d -accessToken j9cV6YRoUof5axDzFeIFUEeVZBbcpurLrJC0wa7ct1A005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1712237419"}} \ No newline at end of file +{"count":1,"self":11.190443199999999,"total":11.464506,"children":{"InitializeActuators":{"count":1,"self":0.000509,"total":0.000509,"children":null},"InitializeSensors":{"count":1,"self":0.0015046,"total":0.0015046,"children":null},"AgentSendState":{"count":458,"self":0.0005938,"total":0.059389899999999995,"children":{"CollectObservations":{"count":229,"self":0.048258699999999995,"total":0.048258699999999995,"children":null},"WriteActionMask":{"count":229,"self":0,"total":0,"children":null},"RequestDecision":{"count":229,"self":0.010537399999999999,"total":0.010537399999999999,"children":null}}},"DecideAction":{"count":458,"self":0.1365659,"total":0.1365659,"children":null},"AgentAct":{"count":458,"self":0.0760933,"total":0.0760933,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712239133","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Drecon2022 -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId f88630f1-920b-4dbe-b665-558da63c889d -accessToken j9cV6YRoUof5axDzFeIFUEeVZBbcpurLrJC0wa7ct1A005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1712239145"}} \ No newline at end of file