forked from cgvr/DeltaVR
2 working sounds, updated scripts, fmod events
This commit is contained in:
Binary file not shown.
@@ -22,6 +22,7 @@ PluginImporter:
|
|||||||
enabled: 1
|
enabled: 1
|
||||||
settings:
|
settings:
|
||||||
CPU: x86_64
|
CPU: x86_64
|
||||||
|
DefaultValueInitialized: true
|
||||||
OS: Windows
|
OS: Windows
|
||||||
- first:
|
- first:
|
||||||
Standalone: Win64
|
Standalone: Win64
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6b340c133bbb22b46ad2d49f4b1c6293
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -6,6 +6,7 @@ using FishNet.Object.Synchronizing;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
|
||||||
public class ArcheryTarget : NetworkBehaviour, IArrowHittable
|
public class ArcheryTarget : NetworkBehaviour, IArrowHittable
|
||||||
{
|
{
|
||||||
public GameObject pointsText;
|
public GameObject pointsText;
|
||||||
@@ -50,6 +51,8 @@ public class ArcheryTarget : NetworkBehaviour, IArrowHittable
|
|||||||
target.SetPoints(score);
|
target.SetPoints(score);
|
||||||
Spawn(prefab);
|
Spawn(prefab);
|
||||||
|
|
||||||
|
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.UFODestroy, gameObject);
|
||||||
|
|
||||||
Despawn(arrow.gameObject, DespawnType.Pool);
|
Despawn(arrow.gameObject, DespawnType.Pool);
|
||||||
Despawn(gameObject, DespawnType.Pool);
|
Despawn(gameObject, DespawnType.Pool);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.XR.Interaction.Toolkit;
|
using UnityEngine.XR.Interaction.Toolkit;
|
||||||
|
using FMOD.Studio;
|
||||||
|
|
||||||
namespace _PROJECT.Components.Drawing
|
namespace _PROJECT.Components.Drawing
|
||||||
{
|
{
|
||||||
@@ -18,16 +19,26 @@ namespace _PROJECT.Components.Drawing
|
|||||||
private float _cooldownTimer = 0f;
|
private float _cooldownTimer = 0f;
|
||||||
private bool _isSpraying;
|
private bool _isSpraying;
|
||||||
|
|
||||||
|
private EventInstance spray_sound;
|
||||||
|
|
||||||
protected override void OnActivated(ActivateEventArgs args)
|
protected override void OnActivated(ActivateEventArgs args)
|
||||||
{
|
{
|
||||||
base.OnActivated(args);
|
base.OnActivated(args);
|
||||||
StartSpray();
|
StartSpray();
|
||||||
|
|
||||||
|
spray_sound = AudioManager.Instance.CreateInstance(FMODEvents.Instance.Spray);
|
||||||
|
spray_sound.setParameterByName("SpraySwitcher", 0); //"Spray - 0 in FMOD"
|
||||||
|
spray_sound.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(sprayPoint));
|
||||||
|
spray_sound.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDeactivated(DeactivateEventArgs args)
|
protected override void OnDeactivated(DeactivateEventArgs args)
|
||||||
{
|
{
|
||||||
base.OnDeactivated(args);
|
base.OnDeactivated(args);
|
||||||
StopSpray();
|
StopSpray();
|
||||||
|
|
||||||
|
spray_sound.setParameterByName("SpraySwitcher", 1); //"NoSpray - 1 in FMOD"
|
||||||
|
spray_sound.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
private new void Awake()
|
private new void Awake()
|
||||||
@@ -43,21 +54,37 @@ namespace _PROJECT.Components.Drawing
|
|||||||
_isSpraying = true;
|
_isSpraying = true;
|
||||||
trigger.transform.Rotate(0f, 0f, -8.5f);
|
trigger.transform.Rotate(0f, 0f, -8.5f);
|
||||||
sprayPart.Play(true);
|
sprayPart.Play(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StopSpray()
|
private void StopSpray()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
_isSpraying = false;
|
_isSpraying = false;
|
||||||
trigger.transform.Rotate(0f, 0f, 8.5f);
|
trigger.transform.Rotate(0f, 0f, 8.5f);
|
||||||
sprayPart.Stop(true, ParticleSystemStopBehavior.StopEmitting);
|
sprayPart.Stop(true, ParticleSystemStopBehavior.StopEmitting);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
if (_isSpraying)
|
||||||
|
{
|
||||||
|
spray_sound.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(sprayPoint));
|
||||||
|
}
|
||||||
|
|
||||||
if (!isSelected || !_isSpraying)
|
if (!isSelected || !_isSpraying)
|
||||||
{
|
{
|
||||||
if (!sprayPart.isPlaying) return;
|
if (!sprayPart.isPlaying) return;
|
||||||
sprayPart.Stop(true, ParticleSystemStopBehavior.StopEmitting);
|
sprayPart.Stop(true, ParticleSystemStopBehavior.StopEmitting);
|
||||||
|
|
||||||
|
spray_sound.setParameterByName("SpraySwitcher", 1); //"NoSpray - 1 in FMOD"
|
||||||
|
spray_sound.release();
|
||||||
|
|
||||||
_isSpraying = false;
|
_isSpraying = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4379,6 +4379,7 @@ GameObject:
|
|||||||
- component: {fileID: 6243020581121736520}
|
- component: {fileID: 6243020581121736520}
|
||||||
- component: {fileID: 1248243081272065818}
|
- component: {fileID: 1248243081272065818}
|
||||||
- component: {fileID: 7904742026328308208}
|
- component: {fileID: 7904742026328308208}
|
||||||
|
- component: {fileID: 438034309889585932}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Main Camera
|
m_Name: Main Camera
|
||||||
m_TagString: MainCamera
|
m_TagString: MainCamera
|
||||||
@@ -4615,6 +4616,20 @@ MonoBehaviour:
|
|||||||
mipBias: 0
|
mipBias: 0
|
||||||
varianceClampScale: 0.9
|
varianceClampScale: 0.9
|
||||||
contrastAdaptiveSharpening: 0
|
contrastAdaptiveSharpening: 0
|
||||||
|
--- !u!114 &438034309889585932
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6810398627900972352}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 86c6556701af9e04380698b89f691b6e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
nonRigidbodyVelocity: 0
|
||||||
|
attenuationObject: {fileID: 0}
|
||||||
--- !u!1 &6839907377310123617
|
--- !u!1 &6839907377310123617
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class SpaceEnterCollider : MonoBehaviour
|
|||||||
playerGravity.isInSpace = true;
|
playerGravity.isInSpace = true;
|
||||||
}
|
}
|
||||||
Debug.Log(other + " entered space.");
|
Debug.Log(other + " entered space.");
|
||||||
|
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.PortalEnter, gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerExit(Collider other)
|
private void OnTriggerExit(Collider other)
|
||||||
@@ -52,5 +53,6 @@ public class SpaceEnterCollider : MonoBehaviour
|
|||||||
yield return new WaitForSeconds(1f); // Wait for 1 second
|
yield return new WaitForSeconds(1f); // Wait for 1 second
|
||||||
playerGravity.isInSpace = false;
|
playerGravity.isInSpace = false;
|
||||||
Debug.Log("Default gravity restored after 1 second.");
|
Debug.Log("Default gravity restored after 1 second.");
|
||||||
|
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.PortalEnter, gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ GameObject:
|
|||||||
- component: {fileID: 1377620620750533915}
|
- component: {fileID: 1377620620750533915}
|
||||||
- component: {fileID: 1970713256952188388}
|
- component: {fileID: 1970713256952188388}
|
||||||
- component: {fileID: 5044934254662751385}
|
- component: {fileID: 5044934254662751385}
|
||||||
|
- component: {fileID: -4170824526974918850}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Camera
|
m_Name: Camera
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -136,6 +137,20 @@ MonoBehaviour:
|
|||||||
mipBias: 0
|
mipBias: 0
|
||||||
varianceClampScale: 0.9
|
varianceClampScale: 0.9
|
||||||
contrastAdaptiveSharpening: 0
|
contrastAdaptiveSharpening: 0
|
||||||
|
--- !u!114 &-4170824526974918850
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1135870841938864998}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 86c6556701af9e04380698b89f691b6e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
nonRigidbodyVelocity: 0
|
||||||
|
attenuationObject: {fileID: 0}
|
||||||
--- !u!1 &8146527781413792986
|
--- !u!1 &8146527781413792986
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -0,0 +1,172 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1655073418706034053
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 9180070700129594715}
|
||||||
|
- component: {fileID: 4356298221615373898}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: AudioManager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &9180070700129594715
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1655073418706034053}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 7894972621602398953}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &4356298221615373898
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1655073418706034053}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: c87d04403eccfb742b177e2556692f35, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
MasterVolume: 1
|
||||||
|
MusicVolume: 1
|
||||||
|
SFXVolume: 1
|
||||||
|
UIVolume: 1
|
||||||
|
--- !u!1 &1996732796420301035
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7894972621602398953}
|
||||||
|
- component: {fileID: 4888381682027141557}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: FMODEvents
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7894972621602398953
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1996732796420301035}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 9180070700129594715}
|
||||||
|
m_RootOrder: -1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &4888381682027141557
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1996732796420301035}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f7db9618133cf954a8f3392be7f313b3, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
<Steps>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 54902525
|
||||||
|
Data2: 1271041905
|
||||||
|
Data3: -1176121172
|
||||||
|
Data4: -392562473
|
||||||
|
Path:
|
||||||
|
<Teleport>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 54902525
|
||||||
|
Data2: 1271041905
|
||||||
|
Data3: -1176121172
|
||||||
|
Data4: -392562473
|
||||||
|
Path:
|
||||||
|
<UFODestroy>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<PortalEnter>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<SprayerTake>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<Spray>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<DoorOpen>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<DoorClose>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<Click>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<MapOpen>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
|
<Hover>k__BackingField:
|
||||||
|
Guid:
|
||||||
|
Data1: 0
|
||||||
|
Data2: 0
|
||||||
|
Data3: 0
|
||||||
|
Data4: 0
|
||||||
|
Path:
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2a2da351f702ded43943f5ded66c8863
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@@ -7,6 +7,8 @@ using UnityEditor;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
using STOP_MODE = FMOD.Studio.STOP_MODE;
|
||||||
|
|
||||||
public class AudioManager : MonoBehaviour
|
public class AudioManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
[Header("Volume")]
|
[Header("Volume")]
|
||||||
@@ -133,6 +135,48 @@ public class AudioManager : MonoBehaviour
|
|||||||
Debug.LogWarning("EventReference is null, ignoring...");
|
Debug.LogWarning("EventReference is null, ignoring...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PlayOneShot3D(EventReference sound, Vector3 position)
|
||||||
|
{
|
||||||
|
if (!IsEventReferenceValid(sound))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("Tried to play invalid FMOD event (3D)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RuntimeManager.PlayOneShot(sound, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EventInstance PlayAttachedInstance(EventReference sound, GameObject go)
|
||||||
|
{
|
||||||
|
if (!IsEventReferenceValid(sound))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("Tried to play invalid FMOD event (attached)");
|
||||||
|
return default;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventInstance instance = RuntimeManager.CreateInstance(sound);
|
||||||
|
RuntimeManager.AttachInstanceToGameObject(instance, go);
|
||||||
|
instance.start();
|
||||||
|
|
||||||
|
eventInstances.Add(instance);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StopInstance(EventInstance instance, STOP_MODE mode = STOP_MODE.ALLOWFADEOUT)
|
||||||
|
{
|
||||||
|
if (!instance.isValid()) return;
|
||||||
|
instance.stop(mode);
|
||||||
|
instance.release();
|
||||||
|
eventInstances.Remove(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetParameter(EventInstance instance, string parameterName, float value)
|
||||||
|
{
|
||||||
|
if (!instance.isValid()) return;
|
||||||
|
instance.setParameterByName(parameterName, value);
|
||||||
|
}
|
||||||
|
|
||||||
public void InitializeMusic(EventReference musicEventReference)
|
public void InitializeMusic(EventReference musicEventReference)
|
||||||
{
|
{
|
||||||
if (musicEventReference.Guid == nullGuid)
|
if (musicEventReference.Guid == nullGuid)
|
||||||
|
|||||||
@@ -4,12 +4,21 @@ using UnityEngine;
|
|||||||
public class FMODEvents : MonoBehaviour
|
public class FMODEvents : MonoBehaviour
|
||||||
{
|
{
|
||||||
[field: Header("SFX")]
|
[field: Header("SFX")]
|
||||||
[field: SerializeField] public EventReference TestSound { get; private set; }
|
[field: SerializeField] public EventReference Steps { get; private set; }
|
||||||
|
[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 Spray { get; private set; }
|
||||||
|
|
||||||
|
[field: Header("CAR")]
|
||||||
|
[field: SerializeField] public EventReference DoorOpen { get; private set; }
|
||||||
|
[field: SerializeField] public EventReference DoorClose { get; private set; }
|
||||||
|
|
||||||
[field: Header("UI")]
|
[field: Header("UI")]
|
||||||
[field: SerializeField] public EventReference ButtonClick { get; private set; }
|
[field: SerializeField] public EventReference Click { get; private set; }
|
||||||
[field: SerializeField] public EventReference ButtonSelect { get; private set; }
|
[field: SerializeField] public EventReference MapOpen { get; private set; }
|
||||||
|
[field: SerializeField] public EventReference Hover { get; private set; }
|
||||||
|
|
||||||
public static FMODEvents Instance { get; private set; }
|
public static FMODEvents Instance { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class LoadBankAndScene : MonoBehaviour
|
||||||
|
{
|
||||||
|
[FMODUnity.BankRef]
|
||||||
|
public List<string> banks;
|
||||||
|
public static event Action OnBanksLoaded;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
LoadBanks();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadBanks()
|
||||||
|
{
|
||||||
|
foreach (string b in banks)
|
||||||
|
{
|
||||||
|
FMODUnity.RuntimeManager.LoadBank(b, true);
|
||||||
|
Debug.Log("Loaded bank " + b);
|
||||||
|
}
|
||||||
|
StartCoroutine(CheckBanksLoaded());
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator CheckBanksLoaded()
|
||||||
|
{
|
||||||
|
while (!FMODUnity.RuntimeManager.HaveAllBanksLoaded)
|
||||||
|
{
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
OnBanksLoaded?.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 26520d10d6a04d84fbbdad4ae135f015
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user