From 0dea47759c5029e41421171d854d1ba651b66c16 Mon Sep 17 00:00:00 2001 From: Cristiano Piemontese Date: Fri, 30 Aug 2024 23:18:31 +0200 Subject: [PATCH] fix music playing --- Assets/Prefabs/MusicPlayer.prefab | 142 +++++++++++++++ Assets/Prefabs/MusicPlayer.prefab.meta | 7 + Assets/Scripts/GameManager.cs | 16 +- Assets/Scripts/MusicPlayer.cs | 22 +++ Assets/Scripts/MusicPlayer.cs.meta | 11 ++ Assets/_Scenes/AIWin.unity | 99 +---------- Assets/_Scenes/Game.unity | 147 +++++----------- Assets/_Scenes/PlayerWin.unity | 99 +---------- Assets/_Scenes/Start Menu.unity | 228 ++++++++++++++----------- ProjectSettings/TagManager.asset | 1 + 10 files changed, 369 insertions(+), 403 deletions(-) create mode 100644 Assets/Prefabs/MusicPlayer.prefab create mode 100644 Assets/Prefabs/MusicPlayer.prefab.meta create mode 100644 Assets/Scripts/MusicPlayer.cs create mode 100644 Assets/Scripts/MusicPlayer.cs.meta diff --git a/Assets/Prefabs/MusicPlayer.prefab b/Assets/Prefabs/MusicPlayer.prefab new file mode 100644 index 0000000..4a7bb21 --- /dev/null +++ b/Assets/Prefabs/MusicPlayer.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8946490389915889960 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8946490389915889963} + - component: {fileID: 8946490389915889962} + - component: {fileID: 8946490389915889973} + m_Layer: 0 + m_Name: MusicPlayer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8946490389915889963 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8946490389915889960} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.9940233, y: -2.6260545, z: 104.16295} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8946490389915889962 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8946490389915889960} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 10464f60cc680df43959029edeba5d54, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!82 &8946490389915889973 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8946490389915889960} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 3cb0a16784fa7864f97cb714ff3a6528, type: 3} + m_PlayOnAwake: 0 + 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 diff --git a/Assets/Prefabs/MusicPlayer.prefab.meta b/Assets/Prefabs/MusicPlayer.prefab.meta new file mode 100644 index 0000000..bd31e1d --- /dev/null +++ b/Assets/Prefabs/MusicPlayer.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 087c93976d7567a41a317795afb3c815 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 78e8c66..ad80ab1 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -6,8 +6,8 @@ public class GameManager : MonoBehaviour { public GameObject gamePausedUI; public GameObject settingsUI; + public MusicPlayer musicPlayer; public bool openPausedUIOnEsc = false; - public AudioSource musicSource; public Toggle[] difficultyToggles; public Toggle musicToggle; public int winningScore = 10; @@ -49,7 +49,7 @@ public int music { _music = 1 - _music; PrefsManager.music = _music; - UpdateMusicSource(); + UpdateMusicPlayer(); } } @@ -74,11 +74,13 @@ public bool settingsOpen void Awake() { + musicPlayer = GameObject.FindGameObjectWithTag("MusicPlayer").GetComponent(); + Time.timeScale = 1f; PrefsManager.PrintPrefs(); _music = PrefsManager.music; _difficulty = PrefsManager.difficulty; - UpdateMusicSource(); + UpdateMusicPlayer(); if (_difficulty < difficultyToggles.Length) { @@ -98,14 +100,14 @@ void Update() } } - void UpdateMusicSource() + void UpdateMusicPlayer() { - if (musicSource) + if (musicPlayer != null) { if (_music == 1) - musicSource.Play(); + musicPlayer.PlayMusic(); else - musicSource.Pause(); + musicPlayer.PauseMusic(); } } diff --git a/Assets/Scripts/MusicPlayer.cs b/Assets/Scripts/MusicPlayer.cs new file mode 100644 index 0000000..9bc0e78 --- /dev/null +++ b/Assets/Scripts/MusicPlayer.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +public class MusicPlayer : MonoBehaviour +{ + private AudioSource _audioSource; + private void Awake() + { + DontDestroyOnLoad(transform.gameObject); + _audioSource = GetComponent(); + } + + public void PlayMusic() + { + if (_audioSource.isPlaying) return; + _audioSource.Play(); + } + + public void PauseMusic() + { + _audioSource.Pause(); + } +} diff --git a/Assets/Scripts/MusicPlayer.cs.meta b/Assets/Scripts/MusicPlayer.cs.meta new file mode 100644 index 0000000..a987ece --- /dev/null +++ b/Assets/Scripts/MusicPlayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10464f60cc680df43959029edeba5d54 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Scenes/AIWin.unity b/Assets/_Scenes/AIWin.unity index 527f042..db00fa4 100644 --- a/Assets/_Scenes/AIWin.unity +++ b/Assets/_Scenes/AIWin.unity @@ -131,7 +131,6 @@ GameObject: - component: {fileID: 14724808} - component: {fileID: 14724807} - component: {fileID: 14724806} - - component: {fileID: 14724809} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -204,102 +203,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!82 &14724809 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 14724805} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 3cb0a16784fa7864f97cb714ff3a6528, type: 3} - m_PlayOnAwake: 0 - m_Volume: 0.5 - m_Pitch: 1 - Loop: 1 - Mute: 1 - Spatialize: 0 - SpatializePostEffects: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 1 - 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 &92338370 GameObject: m_ObjectHideFlags: 0 @@ -1133,7 +1036,7 @@ PrefabInstance: type: 3} propertyPath: musicSource value: - objectReference: {fileID: 14724809} + objectReference: {fileID: 0} - target: {fileID: 9175822297736086647, guid: 8c333de40ae158fdeb4abff8fdfac6cb, type: 3} propertyPath: m_LocalPosition.x diff --git a/Assets/_Scenes/Game.unity b/Assets/_Scenes/Game.unity index 52253e4..1c05367 100644 --- a/Assets/_Scenes/Game.unity +++ b/Assets/_Scenes/Game.unity @@ -292,7 +292,6 @@ GameObject: - component: {fileID: 519420032} - component: {fileID: 519420031} - component: {fileID: 519420029} - - component: {fileID: 519420030} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -308,102 +307,6 @@ AudioListener: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_Enabled: 1 ---- !u!82 &519420030 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519420028} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 3cb0a16784fa7864f97cb714ff3a6528, type: 3} - m_PlayOnAwake: 1 - m_Volume: 0.5 - 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: 1 - 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!20 &519420031 Camera: m_ObjectHideFlags: 0 @@ -471,7 +374,7 @@ PrefabInstance: - target: {fileID: 1493380602051135222, guid: e1354bcaa4d35cab5990f9494368254e, type: 3} propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.size - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 1493380602051135222, guid: e1354bcaa4d35cab5990f9494368254e, type: 3} @@ -513,6 +416,11 @@ PrefabInstance: propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_BoolArgument value: 0 objectReference: {fileID: 0} + - target: {fileID: 1493380602051135222, guid: e1354bcaa4d35cab5990f9494368254e, + type: 3} + propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3802334185796793351, guid: e1354bcaa4d35cab5990f9494368254e, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target @@ -774,7 +682,7 @@ MonoBehaviour: type: 3} m_PrefabInstance: {fileID: 644523029} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} + m_GameObject: {fileID: 644523036} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} @@ -816,6 +724,40 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &644523036 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7764954434556522647, guid: e1354bcaa4d35cab5990f9494368254e, + type: 3} + m_PrefabInstance: {fileID: 644523029} + m_PrefabAsset: {fileID: 0} +--- !u!114 &644523037 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 644523036} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1996176071} + m_MethodName: set_music + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &824539944 GameObject: m_ObjectHideFlags: 0 @@ -1695,7 +1637,7 @@ PrefabInstance: type: 3} propertyPath: musicSource value: - objectReference: {fileID: 519420030} + objectReference: {fileID: 0} - target: {fileID: 9175822297736086646, guid: 8c333de40ae158fdeb4abff8fdfac6cb, type: 3} propertyPath: difficultyToggles.Array.data[0] @@ -1716,6 +1658,11 @@ PrefabInstance: propertyPath: musicToggle value: objectReference: {fileID: 644523032} + - target: {fileID: 9175822297736086646, guid: 8c333de40ae158fdeb4abff8fdfac6cb, + type: 3} + propertyPath: winningScore + value: 1 + objectReference: {fileID: 0} - target: {fileID: 9175822297736086647, guid: 8c333de40ae158fdeb4abff8fdfac6cb, type: 3} propertyPath: m_LocalPosition.x diff --git a/Assets/_Scenes/PlayerWin.unity b/Assets/_Scenes/PlayerWin.unity index c00131b..34c20d6 100644 --- a/Assets/_Scenes/PlayerWin.unity +++ b/Assets/_Scenes/PlayerWin.unity @@ -166,7 +166,7 @@ PrefabInstance: type: 3} propertyPath: musicSource value: - objectReference: {fileID: 408751532} + objectReference: {fileID: 0} - target: {fileID: 9175822297736086647, guid: 8c333de40ae158fdeb4abff8fdfac6cb, type: 3} propertyPath: m_LocalPosition.x @@ -247,7 +247,6 @@ GameObject: - component: {fileID: 408751531} - component: {fileID: 408751530} - component: {fileID: 408751529} - - component: {fileID: 408751532} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -320,102 +319,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!82 &408751532 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 408751528} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 3cb0a16784fa7864f97cb714ff3a6528, type: 3} - m_PlayOnAwake: 0 - m_Volume: 0.5 - m_Pitch: 1 - Loop: 1 - Mute: 1 - Spatialize: 0 - SpatializePostEffects: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 1 - 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 &589308309 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/_Scenes/Start Menu.unity b/Assets/_Scenes/Start Menu.unity index a215ce5..ad95e94 100644 --- a/Assets/_Scenes/Start Menu.unity +++ b/Assets/_Scenes/Start Menu.unity @@ -130,7 +130,7 @@ PrefabInstance: - target: {fileID: 1493380602051135222, guid: e1354bcaa4d35cab5990f9494368254e, type: 3} propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.size - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 1493380602051135222, guid: e1354bcaa4d35cab5990f9494368254e, type: 3} @@ -396,6 +396,40 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 43857324} m_PrefabAsset: {fileID: 0} +--- !u!1 &43857327 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7764954434556522647, guid: e1354bcaa4d35cab5990f9494368254e, + type: 3} + m_PrefabInstance: {fileID: 43857324} + m_PrefabAsset: {fileID: 0} +--- !u!114 &43857328 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 43857327} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1950493495} + m_MethodName: set_music + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &156515826 GameObject: m_ObjectHideFlags: 0 @@ -625,7 +659,6 @@ GameObject: - component: {fileID: 394972523} - component: {fileID: 394972522} - component: {fileID: 394972521} - - component: {fileID: 394972524} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -698,102 +731,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!82 &394972524 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 394972520} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 3cb0a16784fa7864f97cb714ff3a6528, type: 3} - m_PlayOnAwake: 0 - m_Volume: 0.5 - 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: 1 - 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 &410614415 GameObject: m_ObjectHideFlags: 0 @@ -929,7 +866,7 @@ MonoBehaviour: type: 3} m_PrefabInstance: {fileID: 43857324} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} + m_GameObject: {fileID: 43857327} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} @@ -1259,6 +1196,18 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: colorChangeDuration: 2.5 +--- !u!114 &769935503 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8946490389915889962, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + m_PrefabInstance: {fileID: 8946490389163260325} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 10464f60cc680df43959029edeba5d54, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1122424615 GameObject: m_ObjectHideFlags: 0 @@ -1560,7 +1509,12 @@ PrefabInstance: type: 3} propertyPath: musicSource value: - objectReference: {fileID: 394972524} + objectReference: {fileID: 0} + - target: {fileID: 9175822297736086646, guid: 8c333de40ae158fdeb4abff8fdfac6cb, + type: 3} + propertyPath: musicPlayer + value: + objectReference: {fileID: 769935503} - target: {fileID: 9175822297736086647, guid: 8c333de40ae158fdeb4abff8fdfac6cb, type: 3} propertyPath: m_LocalPosition.x @@ -1696,3 +1650,77 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &8946490389163260325 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 8946490389915889960, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_Name + value: MusicPlayer + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889960, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_TagString + value: MusicPlayer + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.9940233 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalPosition.y + value: -2.6260545 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalPosition.z + value: 104.16295 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8946490389915889963, guid: 087c93976d7567a41a317795afb3c815, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 087c93976d7567a41a317795afb3c815, type: 3} diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index baaf640..ecabeea 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -7,6 +7,7 @@ TagManager: - Ball - SettingsStore - AI + - MusicPlayer layers: - Default - TransparentFX