camera switch sound update
This commit is contained in:
@@ -9,6 +9,8 @@ public class AudioManager : MonoBehaviour
|
||||
public static AudioManager instance { get; private set; }
|
||||
[SerializeField] public EventReference m_Soundtrack;
|
||||
|
||||
[SerializeField] public EventReference m_CameraSwitch;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (instance != null)
|
||||
@@ -40,12 +42,12 @@ public class AudioManager : MonoBehaviour
|
||||
// Physic's based sounds
|
||||
public void PlayOneShotAttached(EventReference sound, GameObject obj, float force)
|
||||
{
|
||||
RuntimeManager.PlayOneShotAttached(sound, obj, 1f, 0.01f);
|
||||
RuntimeManager.PlayOneShotAttached(sound, obj, 1f, force * 0.005f);
|
||||
}
|
||||
|
||||
public void PlayOneShotAttachedBreathing(EventReference sound, GameObject obj, float force)
|
||||
{
|
||||
//RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.05f);
|
||||
RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.05f);
|
||||
}
|
||||
|
||||
public void StopSound(EventInstance soundInst)
|
||||
@@ -57,6 +59,6 @@ public class AudioManager : MonoBehaviour
|
||||
|
||||
public void PlaySoundOnCameraSwitch()
|
||||
{
|
||||
Debug.Log("Halo");
|
||||
PlaySound(m_CameraSwitch);
|
||||
}
|
||||
}
|
||||
@@ -200,8 +200,6 @@ public class CameraManager : MonoBehaviour
|
||||
|
||||
private void SetCamera(GameObject camera)
|
||||
{
|
||||
AudioManager.instance.PlaySoundOnCameraSwitch();
|
||||
|
||||
SetCameraBlend(camera);
|
||||
|
||||
// Set all camera to active, and set all priorities to 0, bar the first camera
|
||||
@@ -227,7 +225,8 @@ public class CameraManager : MonoBehaviour
|
||||
if(!pastCamera.GetComponent<VirtualCameraSettings>().m_CameraSettings.cut
|
||||
|| !m_ActiveCamera.GetComponent<VirtualCameraSettings>().m_CameraSettings.cut){
|
||||
blendtime = 0;
|
||||
}
|
||||
AudioManager.instance.PlaySoundOnCameraSwitch();
|
||||
}
|
||||
|
||||
// if (AreDifferentPairs(pastCamera.tag, m_ActiveCamera.tag, "vc_Body", "vc_Agent") || AreDifferentPairs(pastCamera.tag, m_ActiveCamera.tag, "vc_Environment", "vc_Agent") || AreDifferentPairs(pastCamera.tag, m_ActiveCamera.tag, "vc_Environment", "vc_Body")
|
||||
// || AreDifferentPairs(pastCamera.tag, m_ActiveCamera.tag, "vc_Environment", "vc_Environment") || AreDifferentPairs(pastCamera.tag, m_ActiveCamera.tag, "vc_Body", "vc_Body") || AreDifferentPairs(pastCamera.tag, m_ActiveCamera.tag, "vc_Actuations", "vc_Body")
|
||||
|
||||
Reference in New Issue
Block a user