add audiomanager

This commit is contained in:
Fangh 2024-01-28 15:42:54 +01:00
parent 8b35285abc
commit 28e03f2395
29 changed files with 254 additions and 306 deletions

138
Assets/Audios/Mixer.mixer Normal file
View File

@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!243 &-9193339872731100694
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Music
m_AudioMixer: {fileID: 24100000}
m_GroupID: f17cabc87452649a2b18d96000b669b0
m_Children: []
m_Volume: 1613f111ba37b4211ab10fd731a08910
m_Pitch: 6d534022cb299469fb27178e6680f82d
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 4578690053529407285}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!241 &24100000
AudioMixerController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Mixer
m_OutputGroup: {fileID: 0}
m_MasterGroup: {fileID: 24300002}
m_Snapshots:
- {fileID: 24500006}
m_StartSnapshot: {fileID: 24500006}
m_SuspendThreshold: -80
m_EnableSuspend: 1
m_UpdateMode: 0
m_ExposedParameters: []
m_AudioMixerGroupViews:
- guids:
- 501d2c8a51be649b898772eac7a44794
- a742f5087766d478eb021c8040417802
- f17cabc87452649a2b18d96000b669b0
name: View
m_CurrentViewIndex: 0
m_TargetSnapshot: {fileID: 24500006}
--- !u!243 &24300002
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Master
m_AudioMixer: {fileID: 24100000}
m_GroupID: 501d2c8a51be649b898772eac7a44794
m_Children:
- {fileID: -9193339872731100694}
- {fileID: 5041602002061892305}
m_Volume: 526d9581d6f68479082360ed52a3573d
m_Pitch: ed81dc3454ff54047857730f0dff0d4c
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 24400004}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &24400004
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: f7295dc1bc0fc43cbbdd7b8e97df58a2
m_EffectName: Attenuation
m_MixLevel: 71d20df30fbaf4f2f8bf27e4cf1c7510
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!245 &24500006
AudioMixerSnapshotController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Snapshot
m_AudioMixer: {fileID: 24100000}
m_SnapshotID: c416757bd7a954c1ba54bd6ca634b0f1
m_FloatValues: {}
m_TransitionOverrides: {}
--- !u!244 &4578690053529407285
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: d1ce4088c24dc46ae864980632dd2680
m_EffectName: Attenuation
m_MixLevel: 4e486cd7e6e884cab95d5e8270b2af8e
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!243 &5041602002061892305
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SFX
m_AudioMixer: {fileID: 24100000}
m_GroupID: a742f5087766d478eb021c8040417802
m_Children: []
m_Volume: 80e52b4e450ba4077a8d0f1ffe44291b
m_Pitch: 578819f90fb094b109895b05b4070e2a
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 5698726703439763546}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &5698726703439763546
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: a5631bd4d7d27476297f2abba51534fe
m_EffectName: Attenuation
m_MixLevel: 0aca4688c7b884252a81953c0de41d78
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 23695c8b913f2468f8e11226c7661601
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 24100000
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Audios/SFX.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d46d224afa2204875ad747a7d01a4cb2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -946,7 +946,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -1703,7 +1703,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -2200,7 +2200,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -4009,7 +4009,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -4479,7 +4479,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -4882,7 +4882,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1117928115}
- component: {fileID: 1117928116}
m_Layer: 5
m_Name: WaitingForPlayersPage
m_TagString: Untagged
@ -4919,102 +4918,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!82 &1117928116
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1117928114}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 7ac3efdb5c840704aafbf19188b3e61e, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &1141337195
GameObject:
m_ObjectHideFlags: 0
@ -5738,6 +5641,7 @@ GameObject:
m_Component:
- component: {fileID: 1277491650}
- component: {fileID: 1277491651}
- component: {fileID: 1277491652}
m_Layer: 0
m_Name: MusicManager
m_TagString: Untagged
@ -5769,8 +5673,8 @@ AudioSource:
m_GameObject: {fileID: 1277491649}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
OutputAudioMixerGroup: {fileID: -9193339872731100694, guid: 23695c8b913f2468f8e11226c7661601, type: 2}
m_audioClip: {fileID: 8300000, guid: 7ac3efdb5c840704aafbf19188b3e61e, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
@ -5856,6 +5760,27 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &1277491652
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1277491649}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ccc6142918f2946509e0c02fbe0df427, type: 3}
m_Name:
m_EditorClassIdentifier:
musics:
- title: 0
clip: {fileID: 8300000, guid: 7ac3efdb5c840704aafbf19188b3e61e, type: 3}
- title: 1
clip: {fileID: 8300000, guid: 0e86c0433979a2d4c884b368808d3cdf, type: 3}
- title: 2
clip: {fileID: 8300000, guid: d782d7e00ee5a0d40a3c005d87c15b3a, type: 3}
- title: 3
clip: {fileID: 8300000, guid: e1135788bf319bd42b6ca512976f9028, type: 3}
--- !u!1 &1318111281
GameObject:
m_ObjectHideFlags: 0
@ -6476,7 +6401,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1451481718}
- component: {fileID: 1451481719}
m_Layer: 5
m_Name: ScorePictureState
m_TagString: Untagged
@ -6507,102 +6431,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!82 &1451481719
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1451481717}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: e1135788bf319bd42b6ca512976f9028, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &1452182575
GameObject:
m_ObjectHideFlags: 0
@ -6663,7 +6491,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -6841,7 +6669,7 @@ MonoBehaviour:
m_text: funnny text
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -7335,7 +7163,7 @@ MonoBehaviour:
m_text: 'Room Code :'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -7552,7 +7380,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1730465903}
- component: {fileID: 1730465904}
m_Layer: 5
m_Name: WaitingForPropositionPage
m_TagString: Untagged
@ -7584,102 +7411,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!82 &1730465904
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1730465902}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 0e86c0433979a2d4c884b368808d3cdf, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &1730898850
GameObject:
m_ObjectHideFlags: 0
@ -8008,7 +7739,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -9537,7 +9268,7 @@ AudioSource:
m_GameObject: {fileID: 1937957481}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
OutputAudioMixerGroup: {fileID: 5041602002061892305, guid: 23695c8b913f2468f8e11226c7661601, type: 2}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
@ -10380,7 +10111,7 @@ MonoBehaviour:
m_text: 1234567890123456
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: fa964d4661e244562b12b69df5792611, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []

View File

@ -0,0 +1,49 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AudioManager : MonoBehaviour
{
public AudioSource musicSource;
public AudioSource sfxSource;
public List<MusicByTitle> musics = new List<MusicByTitle>();
public static AudioManager Instance;
private void Awake()
{
Instance = this;
}
public void ChangeMusic(MusicTitle _title)
{
musicSource.clip = musics.Find(x => x.title == _title).clip;
musicSource.Play();
}
public void StopMusic()
{
musicSource.Stop();
}
public void PlaySFX(AudioClip _clip)
{
sfxSource.PlayOneShot(_clip);
}
}
[System.Serializable]
public class MusicByTitle
{
public MusicTitle title;
public AudioClip clip;
}
public enum MusicTitle
{
Menu,
TakingPicture,
VotingSession,
Ending
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ccc6142918f2946509e0c02fbe0df427
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -383,17 +383,20 @@ private void OnNewGameStateStarted()
waitingForPlayersPage.SetActive(false);
explanationPage.SetActive(true);
endOfExplanationDate = DateTime.Now.AddSeconds(explanationTime);
AudioSource.PlayClipAtPoint(counterSFX, Vector3.zero);
AudioManager.Instance.PlaySFX(counterSFX);
AudioManager.Instance.StopMusic();
//generate all the questions during the explanation
GeneratePrompts();
break;
case (int)GameState.MakeProposition:
Debug.Log("New State : MakeProposition");
AudioManager.Instance.ChangeMusic(MusicTitle.TakingPicture);
HostHasStartedGame();
break;
case (int)GameState.MakeVote:
AudioManager.Instance.ChangeMusic(MusicTitle.VotingSession);
votingPage.ShowVotingPage(
realtimeDB.Child("rooms").Child(myRoom.code)
, myRoom.players
@ -438,7 +441,7 @@ private void CheckPlayersPropositions()
/// <param name="_players"></param>
private void UpdateConnectedPlayerList(List<Player> _players)
{
AudioSource.PlayClipAtPoint(playerJoinSFX, Vector3.zero);
AudioManager.Instance.PlaySFX(playerJoinSFX);
ResetAllPlayerLabels();
Debug.Log($"players count = {_players.Count}");