footstep audio added
This commit is contained in:
@@ -1235,11 +1235,11 @@ retry:
|
||||
instance.release();
|
||||
}
|
||||
|
||||
public static void PlayOneShotAttached(EventReference eventReference, GameObject gameObject)
|
||||
public static void PlayOneShotAttached(EventReference eventReference, GameObject gameObject, float pitch, float volume)
|
||||
{
|
||||
try
|
||||
{
|
||||
PlayOneShotAttached(eventReference.Guid, gameObject);
|
||||
PlayOneShotAttached(eventReference.Guid, gameObject, pitch, volume);
|
||||
}
|
||||
catch (EventNotFoundException)
|
||||
{
|
||||
@@ -1247,11 +1247,11 @@ retry:
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayOneShotAttached(string path, GameObject gameObject)
|
||||
public static void PlayOneShotAttached(string path, GameObject gameObject, float pitch, float volume)
|
||||
{
|
||||
try
|
||||
{
|
||||
PlayOneShotAttached(PathToGUID(path), gameObject);
|
||||
PlayOneShotAttached(PathToGUID(path), gameObject, pitch, volume);
|
||||
}
|
||||
catch (EventNotFoundException)
|
||||
{
|
||||
@@ -1259,7 +1259,7 @@ retry:
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayOneShotAttached(FMOD.GUID guid, GameObject gameObject)
|
||||
public static void PlayOneShotAttached(FMOD.GUID guid, GameObject gameObject, float pitch, float volume)
|
||||
{
|
||||
var instance = CreateInstance(guid);
|
||||
#if UNITY_PHYSICS_EXIST
|
||||
@@ -1269,6 +1269,8 @@ retry:
|
||||
#else
|
||||
AttachInstanceToGameObject(instance, gameObject.transform);
|
||||
#endif
|
||||
instance.setVolume(volume);
|
||||
instance.setPitch(pitch);
|
||||
instance.start();
|
||||
instance.release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user