audio added for text scroll
This commit is contained in:
@@ -35,7 +35,7 @@ public class AgentManager : MonoBehaviour
|
||||
|
||||
private void PlayBreathing(GameObject obj, EventReference sound)
|
||||
{
|
||||
AudioManager.instance.PlayOneShotAttachedBreathing(sound, obj, 1);
|
||||
AudioManager.instance.PlayOneShotAttachedBreathing(sound, obj, 1f);
|
||||
}
|
||||
|
||||
private void PlayRespawnSFX()
|
||||
|
||||
@@ -40,12 +40,13 @@ public class AudioManager : MonoBehaviour
|
||||
// Physic's based sounds
|
||||
public void PlayOneShotAttached(EventReference sound, GameObject obj, float force)
|
||||
{
|
||||
RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.1f);
|
||||
RuntimeManager.PlayOneShotAttached(sound, obj, 1f, 0.01f);
|
||||
Debug.Log(force);
|
||||
}
|
||||
|
||||
public void PlayOneShotAttachedBreathing(EventReference sound, GameObject obj, float force)
|
||||
{
|
||||
RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.3f);
|
||||
//RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.05f);
|
||||
}
|
||||
|
||||
public void StopSound(EventInstance soundInst)
|
||||
|
||||
@@ -15,6 +15,10 @@ public class SubtitleManager : MonoBehaviour
|
||||
private EventReference m_NarrationSFX;
|
||||
[SerializeField]
|
||||
private EventInstance m_NarrationSFXInst;
|
||||
[SerializeField]
|
||||
private EventReference m_TextScrollSFX;
|
||||
[SerializeField]
|
||||
private EventInstance m_TextScrollSFXInst;
|
||||
|
||||
private float m_TimeElapsed;
|
||||
|
||||
@@ -97,6 +101,8 @@ public class SubtitleManager : MonoBehaviour
|
||||
|
||||
//m_Text.text = sentence;
|
||||
|
||||
m_TextScrollSFXInst = AudioManager.instance.PlaySound(m_TextScrollSFX);
|
||||
m_TextScrollSFXInst.start();
|
||||
foreach (char c in sentence.ToCharArray())
|
||||
{
|
||||
index++;
|
||||
@@ -111,7 +117,7 @@ public class SubtitleManager : MonoBehaviour
|
||||
AudioManager.instance.StopSound(m_NarrationSFXInst);
|
||||
}
|
||||
}
|
||||
|
||||
m_TextScrollSFXInst.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
|
||||
StartCoroutine(ClearText(waitTime, false));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user