Some fixes made, object picking logic added
This commit is contained in:
@@ -11,7 +11,6 @@ using STOP_MODE = FMOD.Studio.STOP_MODE;
|
||||
|
||||
public class AudioManager : MonoBehaviour
|
||||
{
|
||||
|
||||
//VCAs (VCA buses) are mainly used for volume control
|
||||
//Regular routing buses routing are for the remaining logic, for example, within the FMOD itself to put FMOD events inside the Mixer (Mixer Routing).
|
||||
//Regular routing buses are used when we make some attenuation based on parameters and write the logic in code for Unity.
|
||||
@@ -272,12 +271,6 @@ public class AudioManager : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
public static bool IsPlaying()
|
||||
{
|
||||
musicEventInstance.getPlaybackState(out PLAYBACK_STATE state);
|
||||
return state != PLAYBACK_STATE.STOPPED;
|
||||
}
|
||||
|
||||
//=====//
|
||||
//=====//
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ public class FMODEvents : MonoBehaviour
|
||||
[field: SerializeField] public EventReference Teleport { get; private set; }
|
||||
[field: SerializeField] public EventReference UFODestroy { get; private set; }
|
||||
[field: SerializeField] public EventReference PortalEnter { get; private set; }
|
||||
[field: SerializeField] public EventReference SprayerTake { get; private set; }
|
||||
[field: SerializeField] public EventReference SprayerGrab { get; private set; }
|
||||
[field: SerializeField] public EventReference DefaultGrab { get; private set; }
|
||||
[field: SerializeField] public EventReference BowGrab { get; private set; }
|
||||
[field: SerializeField] public EventReference Spray { get; private set; }
|
||||
|
||||
[field: Header("CAR")]
|
||||
@@ -60,6 +62,14 @@ public class FMODEvents : MonoBehaviour
|
||||
|
||||
public static FMODEvents Instance { get; private set; }
|
||||
|
||||
|
||||
public enum GrabSoundType
|
||||
{
|
||||
Default,
|
||||
Bow,
|
||||
Sprayer
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null)
|
||||
|
||||
@@ -29,8 +29,6 @@ public class FirstPersonOcclusion : MonoBehaviour
|
||||
|
||||
// ADDED: now stores ALL event instances that must be occluded
|
||||
private List<EventInstance> managedInstances = new List<EventInstance>();
|
||||
|
||||
|
||||
public void InitialiseWithInstance(EventInstance instance)
|
||||
{
|
||||
AudioOccluded = instance;
|
||||
@@ -42,6 +40,8 @@ public class FirstPersonOcclusion : MonoBehaviour
|
||||
GetComponent<Rigidbody>()
|
||||
);
|
||||
|
||||
//instance.setParameterByName("Occlusion", 1f, true);
|
||||
|
||||
managedInstances.Add(AudioOccluded); // ADDED
|
||||
|
||||
AudioOccluded.getDescription(out AudioDes);
|
||||
@@ -63,7 +63,6 @@ public class FirstPersonOcclusion : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private IEnumerator Start()
|
||||
{
|
||||
// If already initialised, skip internal creation
|
||||
|
||||
Reference in New Issue
Block a user