car occlusion, space ambience done
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using FMOD.Studio;
|
||||
|
||||
public class ElevatorOuter : NetworkBehaviour
|
||||
{
|
||||
@@ -25,10 +26,24 @@ public class ElevatorOuter : NetworkBehaviour
|
||||
public ElevatorStatusPlate statusPlate;
|
||||
public AudioSource arrivalBeeper;
|
||||
|
||||
private EventInstance arrivalBeep;
|
||||
private FirstPersonOcclusion occlusion;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
doorOpenTime = box.doorOpenTime;
|
||||
doorCloseTime = box.doorCloseTime;
|
||||
|
||||
arrivalBeep = AudioManager.Instance.CreateInstance(FMODEvents.Instance.ElevatorArrival); //initialising the variable
|
||||
arrivalBeep.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject)); //setting 3d attributes
|
||||
|
||||
occlusion = GetComponent<FirstPersonOcclusion>();
|
||||
|
||||
if (occlusion != null)
|
||||
{
|
||||
occlusion.InitialiseWithInstance(arrivalBeep);
|
||||
}
|
||||
|
||||
}
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
@@ -77,6 +92,11 @@ public class ElevatorOuter : NetworkBehaviour
|
||||
Debug.Log("Outer Doors moved");
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
arrivalBeep.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject)); //updating the attributes
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user