Музыка есть
This commit is contained in:
1 parent
557c4c3dee
commit
346dc97fef
67 files changed
+774
-66
No files matched your search
@@ -13,4 +13,5 @@ MonoBehaviour:
|
||||
m_Name: AddressableAssetGroupSortSettings
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.AddressableAssetGroupSortSettings
|
||||
sortOrder:
|
||||
- 7e9d70e73e500eb9287683466ebf646f
|
||||
- d447fc60305c17a17bf20948ab295a45
|
||||
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: d447fc60305c17a17bf20948ab295a45
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 90c715b85c1e0904b3dc61a9ed460206
|
||||
Hash: 34399050abff08a61a01aced0e2bdda4
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
@@ -60,6 +60,7 @@ MonoBehaviour:
|
||||
m_BuildAddressablesWithPlayerBuild: 0
|
||||
m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]'
|
||||
m_GroupAssets:
|
||||
- {fileID: 11400000, guid: ba51c0b85beab267d8f41a72df4fb657, type: 2}
|
||||
- {fileID: 11400000, guid: 7c592a6445170e8379910601b962cb30, type: 2}
|
||||
m_BuildSettings:
|
||||
m_LogResourceManagerExceptions: 1
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
|
||||
m_Name: Audio
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroup
|
||||
m_GroupName: Audio
|
||||
m_GUID: 7e9d70e73e500eb9287683466ebf646f
|
||||
m_SerializeEntries: []
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 2588e84eb64800d0781c574a37fa48d8, type: 2}
|
||||
m_SchemaSet:
|
||||
m_Schemas: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba51c0b85beab267d8f41a72df4fb657
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -15,16 +15,71 @@ MonoBehaviour:
|
||||
m_GroupName: Default Local Group
|
||||
m_GUID: d447fc60305c17a17bf20948ab295a45
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 03e51c504fa7e0624ba855ec35b60bcc
|
||||
m_Address: absolutely
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 111011400ce13ae859c52c757aef859e
|
||||
m_Address: ahfreeman
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 144ab5188f8ad7a0a92c75703bd12e60
|
||||
m_Address: launch_upmenu1
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 1d7110a045075b22fa27d62bd5f2784e
|
||||
m_Address: 357_shot1
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 23e11d2c8a4f12f4ea9a7a43d1118464
|
||||
m_Address: Gameplay
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2f6134357dc2a5641a846a7478ce4c2c
|
||||
m_Address: bravo!
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 3831a36e0c8e48f659517a6bb99378b6
|
||||
m_Address: cbar_hit1
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 48aebfe8826dc0df79d047b5afbf8f5b
|
||||
m_Address: Canvas
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 803e40b883c823b89a91aa8b9d9fc483
|
||||
m_Address: valve_sound
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 82c71411174bfa86ca1f676b9d389f94
|
||||
m_Address: bastard!
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 9293380a88bf6736889be29722b94269
|
||||
m_Address: Audio/AudioSource
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a306df57f348ce7cf900d0b9431739ee
|
||||
m_Address: launch_selectmenu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b2c9f83c47783069aabb564f68cb0cbb
|
||||
m_Address: absolutelynot
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b2e8dc2aeb0311cd8a826b51cf8e94dc
|
||||
m_Address: GameOver
|
||||
m_ReadOnly: 0
|
||||
@@ -35,6 +90,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ebe18293a5ef86704b23dad3a1786476
|
||||
m_Address: Half-Life01
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f23b9fce9594618e5b75845f1cae50de
|
||||
m_Address: LoadingScreen
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
@@ -14,7 +15,7 @@ namespace Code.App.AppStates
|
||||
private PlayerHealth _playerHealth;
|
||||
private PlayerMoney _playerMoney;
|
||||
|
||||
private bool _uiLoaded, _sceneLoaded;
|
||||
private bool _uiLoaded, _sceneLoaded, _onGameplayMusicLoaded, _onActionMusicLoaded;
|
||||
|
||||
public GameplayState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
@@ -22,7 +23,7 @@ namespace Code.App.AppStates
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
_uiLoaded = _sceneLoaded = false;
|
||||
_uiLoaded = _sceneLoaded = _onActionMusicLoaded = _onGameplayMusicLoaded = false;
|
||||
|
||||
Context.UIService.LoadingScreen.Show();
|
||||
|
||||
@@ -35,12 +36,23 @@ namespace Code.App.AppStates
|
||||
|
||||
Context.UIService.SwitchPanelTo(UIPanel.Gameplay, callback: PostUILoaded);
|
||||
|
||||
Context.AudioFactory.WarmGameplayMusic(OnGameplayMusicLoaded);
|
||||
Context.AudioService.TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.GiveHealth, GiveHealth);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.GiveMoney, GiveMoney);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.LooseHealth, LooseHealth);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.LooseMoney, LooseMoney);
|
||||
}
|
||||
|
||||
private void OnGameplayMusicLoaded()
|
||||
{
|
||||
_onGameplayMusicLoaded = true;
|
||||
|
||||
// Context.AudioService.();
|
||||
|
||||
CheckIfLoaded();
|
||||
}
|
||||
private void OnSceneLoaded()
|
||||
{
|
||||
_sceneLoaded = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Camera.CameraStates;
|
||||
using Code.Input;
|
||||
@@ -14,14 +15,14 @@ namespace Code.App.AppStates
|
||||
{
|
||||
public class MainMenuState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
private bool _uiLoaded, _sceneLoaded;
|
||||
private bool _uiLoaded, _sceneLoaded, _menuMusicLoaded;
|
||||
public MainMenuState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
_uiLoaded = _sceneLoaded = false;
|
||||
_uiLoaded = _sceneLoaded = _menuMusicLoaded = false;
|
||||
|
||||
Context.UIService.LoadingScreen.Show();
|
||||
|
||||
@@ -29,9 +30,20 @@ namespace Code.App.AppStates
|
||||
|
||||
Context.UIService.SwitchPanelTo(UIPanel.MainMenu, PostUILoaded);
|
||||
|
||||
Context.AudioFactory.WarmMenuMusic(MenuMusicLoaded);
|
||||
|
||||
Context.CameraStateMachine.SwitchState(CameraMode.Static);
|
||||
}
|
||||
|
||||
private void MenuMusicLoaded()
|
||||
{
|
||||
_menuMusicLoaded = true;
|
||||
|
||||
Context.AudioService.TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||
Context.AudioService.PlayRandomMenuMusicUntilHumanityWillBeDestroyedForTheySins();
|
||||
|
||||
CheckIfLoaded();
|
||||
}
|
||||
private void PostUILoaded()
|
||||
{
|
||||
((MainMenuPanel)Context.UIService.CurrentPanel).startButton.onClick.AddListener(StartGame);
|
||||
@@ -60,7 +72,7 @@ namespace Code.App.AppStates
|
||||
|
||||
private void CheckIfLoaded()
|
||||
{
|
||||
if(!_uiLoaded || !_sceneLoaded) return;
|
||||
if(!_uiLoaded || !_sceneLoaded || !_menuMusicLoaded) return;
|
||||
|
||||
Context.UIService.LoadingScreen.Hide();
|
||||
|
||||
@@ -87,7 +99,8 @@ namespace Code.App.AppStates
|
||||
public override void ExitState()
|
||||
{
|
||||
Context.InputService.DisableMap(ActionMappings.MainMenu);
|
||||
|
||||
Context.AudioService.GladlyAskToStopMenuMusic(Context.AudioFactory.ReleaseMenuMusic);
|
||||
|
||||
base.ExitState();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Configs;
|
||||
using Code.Constants;
|
||||
using Code.Gameplay.Camera;
|
||||
@@ -32,6 +33,10 @@ namespace Code.App
|
||||
InitializeCamera(containerBuilder, staticDataService);
|
||||
containerBuilder.AddSingleton(typeof(UIFactory), typeof(IUIFactory));
|
||||
containerBuilder.AddSingleton(typeof(UIService), typeof(IUIService));
|
||||
|
||||
containerBuilder.AddSingleton(typeof(AudioFactory), typeof(IAudioFactory));
|
||||
containerBuilder.AddSingleton(typeof(AudioService), typeof(IAudioService));
|
||||
|
||||
containerBuilder.AddSingleton(typeof(SceneLoaderService), typeof(ISceneLoaderService));
|
||||
|
||||
containerBuilder.OnContainerBuilt += Bootstrap;
|
||||
@@ -69,14 +74,23 @@ namespace Code.App
|
||||
containerBuilder.AddSingleton(staticDataService.PlayerConfig, typeof(PlayerConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.CharacterConfig, typeof(CharacterConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.UIConfig, typeof(UIConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.AudioMixerConfig, typeof(AudioMixerConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.SoundtrackListConfig, typeof(SoundtrackListConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.SFXListConfig, typeof(SFXListConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.DispatcherSoundListConfig, typeof(DispatcherSoundListConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.EnemiesSoundListConfig, typeof(EnemiesSoundListConfig));
|
||||
// containerBuilder.AddSingleton(staticDataService.UIConfig.canvasPrefab, typeof(Canvas));
|
||||
// containerBuilder.AddSingleton(staticDataService.UIConfig.uiElementsPrefabs, typeof(UIElement[]));
|
||||
}
|
||||
|
||||
private bool _onUiLoaded;
|
||||
private bool _onAudioLoaded;
|
||||
private AppStateMachine _appStateMachine;
|
||||
private void Bootstrap(Container container)
|
||||
{
|
||||
container.Resolve<IAudioFactory>();
|
||||
IAudioService audioService = container.Resolve<IAudioService>();
|
||||
audioService.Initialize(OnAudioLoaded);
|
||||
|
||||
_appStateMachine = container.Resolve<AppStateMachine>();
|
||||
_appStateMachine.Initialize();
|
||||
AttributeInjector.Inject(_appStateMachine.StateMachineContext, container);
|
||||
@@ -91,16 +105,21 @@ namespace Code.App
|
||||
IUIService uiService = container.Resolve<IUIService>();
|
||||
uiService.Initialize(loadingScreen.GetComponent<LoadingScreen>());
|
||||
|
||||
TryStartGame();
|
||||
}
|
||||
|
||||
|
||||
private void TryStartGame()
|
||||
{
|
||||
|
||||
if (!_onAudioLoaded) return;
|
||||
// TODO: поменяно для теста
|
||||
_appStateMachine
|
||||
.SwitchState(AppState.MainMenu)
|
||||
.AllowStateTransition(AppState.Gameplay);
|
||||
}
|
||||
|
||||
private void OnAudioLoaded()
|
||||
{
|
||||
_onAudioLoaded = true;
|
||||
TryStartGame();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
@@ -15,5 +16,7 @@ namespace Code.App.StateMachine
|
||||
[Inject] public CameraStateMachine CameraStateMachine { get; private set; }
|
||||
[Inject] public IUIService UIService { get; private set; }
|
||||
[Inject] public IPlayerFactory PlayerFactory { get; private set; }
|
||||
[Inject] public IAudioFactory AudioFactory { get; private set; }
|
||||
[Inject] public IAudioService AudioService { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace Code.Audio
|
||||
{
|
||||
public class AudioFactory : IAudioFactory
|
||||
{
|
||||
private AssetReference _audioMixerPrefab;
|
||||
public AudioMixer AudioMixer { get; private set; }
|
||||
private AssetReference _audioSourcePrefab;
|
||||
|
||||
private AssetReference[] _peacefulSoundtrack;
|
||||
@@ -29,43 +29,42 @@ namespace Code.Audio
|
||||
private AsyncOperationHandle<IList<AudioClip>> _SFXHandle;
|
||||
private AsyncOperationHandle<IList<AudioClip>> _enemiesHandle;
|
||||
private AsyncOperationHandle<IList<AudioClip>> _dispatcherHandle;
|
||||
|
||||
public List<AudioClip> PeacefulMusic { get; private set; }
|
||||
public List<AudioClip> ActionMusic { get; private set; }
|
||||
public List<AudioClip> MenuMusic { get; private set; }
|
||||
public List<AudioClip> SFXAudios { get; private set; }
|
||||
public List<AudioClip> EnemiesAudios { get; private set; }
|
||||
public List<AudioClip> DispatcherAudios { get; private set; }
|
||||
|
||||
public List<AudioClip> PeacefulMusic { get; private set; } = new();
|
||||
public List<AudioClip> ActionMusic { get; private set; } = new();
|
||||
public List<AudioClip> MenuMusic { get; private set; } = new();
|
||||
public List<AudioClip> SFXAudios { get; private set; } = new();
|
||||
public List<AudioClip> EnemiesAudios { get; private set; } = new();
|
||||
public List<AudioClip> DispatcherAudios { get; private set; } = new();
|
||||
|
||||
public AudioFactory(AudioMixerConfig audioMixerConfig,
|
||||
SoundtrackListConfig soundtrackListConfig,
|
||||
SFXListConfig sfxListConfig,
|
||||
EnemiesSoundListConfig enemiesSoundListConfig,
|
||||
DispatcherSoundListConfig dispatcherSoundListConfig,
|
||||
CharacterSoundListConfig characterSoundListConfig)
|
||||
DispatcherSoundListConfig dispatcherSoundListConfig//, CharacterSoundListConfig characterSoundListConfig
|
||||
)
|
||||
{
|
||||
_audioMixerPrefab = audioMixerConfig.audioMixerPrefab;
|
||||
AudioMixer = audioMixerConfig.audioMixerAsset;
|
||||
_audioSourcePrefab = audioMixerConfig.audioSourcePrefab;
|
||||
|
||||
_peacefulSoundtrack = soundtrackListConfig.peacefulSoundtrack;
|
||||
_actionSoundtrack = soundtrackListConfig.actionSoundtrack;
|
||||
_actionSoundtrack = soundtrackListConfig.menuSoundtrack;
|
||||
_menuSoundtrack = soundtrackListConfig.menuSoundtrack;
|
||||
_SFX = sfxListConfig.SFX;
|
||||
_enemies = enemiesSoundListConfig.enemies;
|
||||
_dispatcher = dispatcherSoundListConfig.dispatcher;
|
||||
_character = characterSoundListConfig.character;
|
||||
// _character = characterSoundListConfig.character;
|
||||
}
|
||||
|
||||
public async UniTask<AudioMixer> CreateMixer()
|
||||
{
|
||||
AudioMixer audioMixer = (await Addressables.InstantiateAsync(_audioMixerPrefab).ToUniTask()).GetComponent<AudioMixer>();
|
||||
|
||||
Object.DontDestroyOnLoad(audioMixer);
|
||||
|
||||
return audioMixer;
|
||||
}
|
||||
// public async UniTask<AudioMixer> CreateMixer()
|
||||
// {
|
||||
// AudioMixer audioMixer = (await Addressables.InstantiateAsync(_audioMixerPrefab).ToUniTask()).GetComponent<AudioMixer>();
|
||||
//
|
||||
// return audioMixer;
|
||||
// }
|
||||
|
||||
public async UniTaskVoid LoadAudioSourcePrefab(Action<AudioSource> callback) => callback?.Invoke(await Addressables.LoadAssetAsync<AudioSource>(_audioSourcePrefab));
|
||||
public async UniTask LoadAudioSourcePrefab(Action<GameObject> callback) =>
|
||||
callback?.Invoke(await Addressables.LoadAssetAsync<GameObject>(_audioSourcePrefab));
|
||||
|
||||
public async UniTaskVoid WarmGameplayMusic(Action callback)
|
||||
{
|
||||
@@ -88,8 +87,8 @@ namespace Code.Audio
|
||||
|
||||
public async UniTaskVoid WarmMenuMusic(Action callback)
|
||||
{
|
||||
_menuMusicHandle = Addressables.LoadAssetsAsync<AudioClip>(_menuSoundtrack, OnMenuTrackLoaded);
|
||||
|
||||
_menuMusicHandle = Addressables.LoadAssetsAsync<AudioClip>(_menuSoundtrack, OnMenuTrackLoaded, Addressables.MergeMode.None);
|
||||
// foreach (var assetReference in _menuSoundtrack) MenuMusic.Add(await assetReference.LoadAssetAsync<AudioClip>());
|
||||
await _menuMusicHandle.ToUniTask();
|
||||
|
||||
callback?.Invoke();
|
||||
@@ -98,6 +97,7 @@ namespace Code.Audio
|
||||
public void ReleaseMenuMusic()
|
||||
{
|
||||
MenuMusic.Clear();
|
||||
// foreach (var assetReference in _menuSoundtrack) assetReference.ReleaseAsset();
|
||||
_menuMusicHandle.Release();
|
||||
}
|
||||
public async UniTaskVoid WarmSFX(Action callback)
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Code.Configs;
|
||||
using Code.Constants;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Attributes;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
@@ -32,22 +35,16 @@ namespace Code.Audio
|
||||
|
||||
private Dictionary<AudioSnapshotState, AudioMixerSnapshot> _snapshots = new();
|
||||
|
||||
public AudioService(AudioFactory audioFactory)
|
||||
public AudioService(IAudioFactory audioFactory)
|
||||
{
|
||||
_audioFactory = audioFactory;
|
||||
}
|
||||
|
||||
public async void Initialize(Action callback)
|
||||
public async UniTaskVoid Initialize(Action callback)
|
||||
{
|
||||
_mixer = await _audioFactory.CreateMixer();
|
||||
// _mixer = await _audioFactory.CreateMixer();
|
||||
_mixer = _audioFactory.AudioMixer;
|
||||
|
||||
MixerCreated();
|
||||
|
||||
callback?.Invoke();
|
||||
}
|
||||
|
||||
private void MixerCreated()
|
||||
{
|
||||
_masterGroup = _mixer.FindMatchingGroups(AudioGroups.MasterGroup)[0];
|
||||
_actionMusicGroup = _mixer.FindMatchingGroups(AudioGroups.ActionMusicGroup)[0];
|
||||
_peacefulMusicGroup = _mixer.FindMatchingGroups(AudioGroups.PeacefulMusicGroup)[0];
|
||||
@@ -60,10 +57,13 @@ namespace Code.Audio
|
||||
|
||||
_snapshots[AudioSnapshotState.Peaceful] = _mixer.FindSnapshot(AudioGroups.PeacefulSnapshot);
|
||||
_snapshots[AudioSnapshotState.Action] = _mixer.FindSnapshot(AudioGroups.ActionSnapshot);
|
||||
_snapshots[AudioSnapshotState.None] = _mixer.FindSnapshot(AudioGroups.NoneSnapshot);
|
||||
|
||||
_audioFactory.LoadAudioSourcePrefab(_audioSourcePool.Initialize);
|
||||
await _audioFactory.LoadAudioSourcePrefab(_audioSourcePool.Initialize);
|
||||
|
||||
InitializeMusicSources();
|
||||
|
||||
callback?.Invoke();
|
||||
}
|
||||
|
||||
private void InitializeMusicSources()
|
||||
@@ -86,10 +86,128 @@ namespace Code.Audio
|
||||
_peacefulMusicSource.Play();
|
||||
_actionMusicSource.Play();
|
||||
}
|
||||
|
||||
public void TransitToSnapshot(AudioSnapshotState state)
|
||||
public void PlayRandomMenuMusic()
|
||||
{
|
||||
_snapshots[state].TransitionTo(1f);
|
||||
TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||
|
||||
_peacefulMusicSource.resource = _audioFactory.MenuMusic[Random.Range(0, _audioFactory.MenuMusic.Count)];
|
||||
|
||||
_peacefulMusicSource.Play();
|
||||
}
|
||||
|
||||
private CancellationTokenSource _menuMusicTokenSource = new();
|
||||
public async UniTaskVoid PlayRandomMenuMusicUntilHumanityWillBeDestroyedForTheySins()
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||
|
||||
_peacefulMusicSource.resource = _audioFactory.MenuMusic[Random.Range(0, _audioFactory.MenuMusic.Count)];
|
||||
|
||||
_peacefulMusicSource.Play();
|
||||
|
||||
await UniTask.WaitUntilValueChanged(_peacefulMusicSource, _ => _peacefulMusicSource.isPlaying, cancellationToken: _menuMusicTokenSource.Token);
|
||||
if (_menuMusicTokenSource.IsCancellationRequested)
|
||||
{
|
||||
_menuMusicTokenSource.Dispose();
|
||||
_menuMusicTokenSource = new();
|
||||
return;
|
||||
}
|
||||
|
||||
PlayRandomMenuMusicUntilHumanityWillBeDestroyedForTheySins();
|
||||
}
|
||||
private CancellationTokenSource _peacefulMusicTokenSource = new();
|
||||
public async UniTaskVoid PlayRandomPeacefulMusicUntilHumanityWillBeDestroyedForTheySins()
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||
|
||||
_peacefulMusicSource.resource = _audioFactory.PeacefulMusic[Random.Range(0, _audioFactory.PeacefulMusic.Count)];
|
||||
|
||||
_peacefulMusicSource.Play();
|
||||
|
||||
await UniTask.WaitUntilValueChanged(_peacefulMusicSource, _ => _peacefulMusicSource.isPlaying, cancellationToken: _peacefulMusicTokenSource.Token);
|
||||
if (_peacefulMusicTokenSource.IsCancellationRequested)
|
||||
{
|
||||
_peacefulMusicTokenSource.Dispose();
|
||||
_peacefulMusicTokenSource = new();
|
||||
return;
|
||||
}
|
||||
|
||||
PlayRandomPeacefulMusicUntilHumanityWillBeDestroyedForTheySins();
|
||||
}
|
||||
private CancellationTokenSource _actionMusicTokenSource = new();
|
||||
public async UniTaskVoid PlayRandomActionMusicUntilHumanityWillBeDestroyedForTheySins()
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.Action);
|
||||
|
||||
_actionMusicSource.resource = _audioFactory.ActionMusic[Random.Range(0, _audioFactory.ActionMusic.Count)];
|
||||
|
||||
_actionMusicSource.Play();
|
||||
|
||||
await UniTask.WaitUntilValueChanged(_actionMusicSource, _ => _actionMusicSource.isPlaying, cancellationToken: _actionMusicTokenSource.Token);
|
||||
if (_actionMusicTokenSource.IsCancellationRequested)
|
||||
{
|
||||
_actionMusicTokenSource.Dispose();
|
||||
_actionMusicTokenSource = new();
|
||||
return;
|
||||
}
|
||||
|
||||
PlayRandomActionMusicUntilHumanityWillBeDestroyedForTheySins();
|
||||
}
|
||||
|
||||
public void StopMusic()
|
||||
{
|
||||
_peacefulMusicSource.Stop();
|
||||
_actionMusicSource.Stop();
|
||||
}
|
||||
|
||||
public void GladlyAskToStopMusic(Action callback = null)
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.None);
|
||||
_peacefulMusicSource.Stop();
|
||||
_actionMusicSource.Stop();
|
||||
|
||||
callback?.Invoke();
|
||||
}
|
||||
public async UniTaskVoid GladlyAskToStopMenuMusic(Action callback = null)
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.None);
|
||||
|
||||
await UniTask.WaitForSeconds(1f);
|
||||
|
||||
_peacefulMusicSource.Stop();
|
||||
|
||||
_menuMusicTokenSource.Cancel();
|
||||
|
||||
callback?.Invoke();
|
||||
}
|
||||
|
||||
public async UniTaskVoid GladlyAskToStopActionMusic(Action callback = null)
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.None);
|
||||
|
||||
await UniTask.WaitForSeconds(1f);
|
||||
|
||||
_actionMusicSource.Stop();
|
||||
|
||||
_actionMusicTokenSource.Cancel();
|
||||
|
||||
callback?.Invoke();
|
||||
}
|
||||
public async UniTaskVoid GladlyAskToStopPeacefulMusic(Action callback = null)
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.None);
|
||||
|
||||
await UniTask.WaitForSeconds(1f);
|
||||
|
||||
_peacefulMusicSource.Stop();
|
||||
|
||||
_peacefulMusicTokenSource.Cancel();
|
||||
|
||||
callback?.Invoke();
|
||||
}
|
||||
|
||||
public void TransitToSnapshot(AudioSnapshotState state, float time = 1f)
|
||||
{
|
||||
_snapshots[state].TransitionTo(time);
|
||||
}
|
||||
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
|
||||
@@ -2,6 +2,7 @@ namespace Code.Audio
|
||||
{
|
||||
public enum AudioSnapshotState
|
||||
{
|
||||
None,
|
||||
Peaceful,
|
||||
Action
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace Code.Audio
|
||||
{
|
||||
// The pool holds plain GameObjects (you can swap this for any component type).
|
||||
private IObjectPool<AudioSource> _pool;
|
||||
private AudioSource _sourcePrefab;
|
||||
private GameObject _sourcePrefab;
|
||||
|
||||
public void Initialize(AudioSource sourcePrefab)
|
||||
public void Initialize(GameObject sourcePrefab)
|
||||
{
|
||||
_sourcePrefab = sourcePrefab;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Code.Audio
|
||||
// Creates a new pooled GameObject the first time (and whenever the pool needs more).
|
||||
private AudioSource CreateItem()
|
||||
{
|
||||
AudioSource audioSource = Object.Instantiate(_sourcePrefab);
|
||||
AudioSource audioSource = Object.Instantiate(_sourcePrefab).GetComponent<AudioSource>();
|
||||
audioSource.name = "PooledAudioSource";
|
||||
Object.DontDestroyOnLoad(audioSource);
|
||||
return audioSource;
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace Code.Audio
|
||||
List<AudioClip> SFXAudios { get; }
|
||||
List<AudioClip> EnemiesAudios { get; }
|
||||
List<AudioClip> DispatcherAudios { get; }
|
||||
UniTask<AudioMixer> CreateMixer();
|
||||
UniTaskVoid LoadAudioSourcePrefab(Action<AudioSource> callback);
|
||||
AudioMixer AudioMixer { get; }
|
||||
UniTask LoadAudioSourcePrefab(Action<GameObject> callback);
|
||||
UniTaskVoid WarmGameplayMusic(Action callback);
|
||||
void ReleaseGameplayMusic();
|
||||
UniTaskVoid WarmMenuMusic(Action callback);
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
using System;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Audio
|
||||
{
|
||||
public interface IAudioService
|
||||
{
|
||||
void Initialize(Action callback);
|
||||
UniTaskVoid Initialize(Action callback);
|
||||
void PlayRandomGameplayMusic();
|
||||
void TransitToSnapshot(AudioSnapshotState state);
|
||||
void TransitToSnapshot(AudioSnapshotState state, float time = 1f);
|
||||
void PlaySFX(SFXSounds sfxId, Vector3 position);
|
||||
void PlayEnemy(EnemiesSounds enemySoundId, Vector3 position);
|
||||
void PlayDispatcher(DispatcherSounds dispatcherSoundId);
|
||||
void PlayRandomMenuMusic();
|
||||
UniTaskVoid PlayRandomMenuMusicUntilHumanityWillBeDestroyedForTheySins();
|
||||
void StopMusic();
|
||||
void GladlyAskToStopMusic(Action callback = null);
|
||||
UniTaskVoid GladlyAskToStopMenuMusic(Action callback = null);
|
||||
UniTaskVoid GladlyAskToStopActionMusic(Action callback = null);
|
||||
UniTaskVoid GladlyAskToStopPeacefulMusic(Action callback = null);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Audio/Mixer", fileName = "AudioMixerConfig")]
|
||||
public class AudioMixerConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference audioMixerPrefab;
|
||||
public AudioMixer audioMixerAsset;
|
||||
public AssetReference audioSourcePrefab;
|
||||
}
|
||||
}
|
||||
@@ -24,5 +24,6 @@ namespace Code.Constants
|
||||
|
||||
public const string PeacefulSnapshot = "Peaceful";
|
||||
public const string ActionSnapshot = "Action";
|
||||
public const string NoneSnapshot = "None";
|
||||
}
|
||||
}
|
||||
@@ -10,13 +10,18 @@ namespace Code.StaticData
|
||||
{
|
||||
public interface IStaticDataService
|
||||
{
|
||||
void Load();
|
||||
InputConfig InputConfig { get; }
|
||||
AppConfig AppConfig { get; }
|
||||
InputConfig InputConfig { get; }
|
||||
CameraConfig CameraConfig { get; }
|
||||
CharacterConfig CharacterConfig { get; }
|
||||
UIConfig UIConfig { get; }
|
||||
PlayerConfig PlayerConfig { get; }
|
||||
AudioMixerConfig AudioMixerConfig { get; }
|
||||
SoundtrackListConfig SoundtrackListConfig { get; }
|
||||
SFXListConfig SFXListConfig { get; }
|
||||
DispatcherSoundListConfig DispatcherSoundListConfig { get; }
|
||||
EnemiesSoundListConfig EnemiesSoundListConfig { get; }
|
||||
void Load();
|
||||
Task<T> InstantiateAsset<T>(AssetReference assetReference) where T : Behaviour;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,11 @@ namespace Code.StaticData
|
||||
public CharacterConfig CharacterConfig { get; private set; }
|
||||
public UIConfig UIConfig { get; private set; }
|
||||
public PlayerConfig PlayerConfig { get; private set; }
|
||||
public AudioMixerConfig AudioMixerConfig { get; private set; }
|
||||
public SoundtrackListConfig SoundtrackListConfig { get; private set; }
|
||||
public SFXListConfig SFXListConfig { get; private set; }
|
||||
public DispatcherSoundListConfig DispatcherSoundListConfig { get; private set; }
|
||||
public EnemiesSoundListConfig EnemiesSoundListConfig { get; private set; }
|
||||
|
||||
public void Load()
|
||||
{
|
||||
@@ -24,6 +29,17 @@ namespace Code.StaticData
|
||||
CharacterConfig = Resources.Load<CharacterConfig>(string.Format(StringPaths.ConfigSingle, "App", "CharacterConfig"));
|
||||
UIConfig = Resources.Load<UIConfig>(string.Format(StringPaths.ConfigSingle, "App", "UIConfig"));
|
||||
PlayerConfig = Resources.Load<PlayerConfig>(string.Format(StringPaths.ConfigSingle, "App", "PlayerConfig"));
|
||||
|
||||
LoadAudioConfigs();
|
||||
}
|
||||
|
||||
private void LoadAudioConfigs()
|
||||
{
|
||||
AudioMixerConfig = Resources.Load<AudioMixerConfig>(string.Format(StringPaths.ConfigSingle, "Audio", "AudioMixerConfig"));
|
||||
SoundtrackListConfig = Resources.Load<SoundtrackListConfig>(string.Format(StringPaths.ConfigSingle, "Audio", "SoundtrackListConfig"));
|
||||
SFXListConfig = Resources.Load<SFXListConfig>(string.Format(StringPaths.ConfigSingle, "Audio", "SFXListConfig"));
|
||||
DispatcherSoundListConfig = Resources.Load<DispatcherSoundListConfig>(string.Format(StringPaths.ConfigSingle, "Audio", "DispatcherSoundListConfig"));
|
||||
EnemiesSoundListConfig = Resources.Load<EnemiesSoundListConfig>(string.Format(StringPaths.ConfigSingle, "Audio", "EnemiesSoundListConfig"));
|
||||
}
|
||||
|
||||
public async Task<T> InstantiateAsset<T>(AssetReference assetReference) where T : Behaviour
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa24c0d8a11438d4fb57332c144beab6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc9a23cef60c78e46924e5d40b0c2a16
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+16
-2
@@ -131,9 +131,10 @@ AudioMixerController:
|
||||
m_OutputGroup: {fileID: 0}
|
||||
m_MasterGroup: {fileID: 24300002}
|
||||
m_Snapshots:
|
||||
- {fileID: 8341788112416184532}
|
||||
- {fileID: -1214924791136564940}
|
||||
- {fileID: 24500006}
|
||||
m_StartSnapshot: {fileID: -1214924791136564940}
|
||||
m_StartSnapshot: {fileID: 8341788112416184532}
|
||||
m_SuspendThreshold: -80
|
||||
m_EnableSuspend: 1
|
||||
m_UpdateMode: 0
|
||||
@@ -151,7 +152,7 @@ AudioMixerController:
|
||||
- 9eb64ac0ca0e2f1098eafbba1f9633f5
|
||||
name: View
|
||||
m_CurrentViewIndex: 0
|
||||
m_TargetSnapshot: {fileID: 24500006}
|
||||
m_TargetSnapshot: {fileID: -1214924791136564940}
|
||||
--- !u!243 &24300002
|
||||
AudioMixerGroupController:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -341,6 +342,19 @@ AudioMixerEffectController:
|
||||
m_SendTarget: {fileID: 0}
|
||||
m_EnableWetMix: 0
|
||||
m_Bypass: 0
|
||||
--- !u!245 &8341788112416184532
|
||||
AudioMixerSnapshotController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: None
|
||||
m_AudioMixer: {fileID: 24100000}
|
||||
m_SnapshotID: aeb4e4a21399f58f6925016231188466
|
||||
m_FloatValues:
|
||||
4c469b14481ac855fb9fb2989e6e6b94: -80
|
||||
ddab7e07de3c686e296ff10b1cd77a47: -0.037667945
|
||||
m_TransitionOverrides: {}
|
||||
--- !u!243 &9214955797390454771
|
||||
AudioMixerGroupController:
|
||||
m_ObjectHideFlags: 0
|
||||
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 605b8648e0877ca0fa8a701964f43bd6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 353cee8946ca43efbbcda905d7b32ae1, type: 3}
|
||||
m_Name: AudioMixerConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.AudioMixerConfig
|
||||
audioMixerAsset: {fileID: 24100000, guid: ab2634130cfcf5b899bc463c3d060fc4, type: 2}
|
||||
audioSourcePrefab:
|
||||
m_AssetGUID: 9293380a88bf6736889be29722b94269
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 448b7bbc5c338321aa5c601c32c59f36
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 83304a98bbdc4e7c9c7c643653ae1368, type: 3}
|
||||
m_Name: CharacterSoundListConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.CharacterSoundListConfig
|
||||
character: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5160d7af825d295229a3be611f44db76
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8a6f6ffb8f5242899791719801791945, type: 3}
|
||||
m_Name: DispatcherSoundListConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.DispatcherSoundListConfig
|
||||
dispatcher:
|
||||
- m_AssetGUID: 03e51c504fa7e0624ba855ec35b60bcc
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
- m_AssetGUID: b2c9f83c47783069aabb564f68cb0cbb
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
- m_AssetGUID: 111011400ce13ae859c52c757aef859e
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d4abe7737136dbb5a9f7b2c6c982dff
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e73ac7f7e3cd4db8ada95f63d73c2d1d, type: 3}
|
||||
m_Name: EnemiesSoundListConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.EnemiesSoundListConfig
|
||||
enemies:
|
||||
- m_AssetGUID: 82c71411174bfa86ca1f676b9d389f94
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
- m_AssetGUID: 2f6134357dc2a5641a846a7478ce4c2c
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1583ccd0a7b02640b16a10cc784a39f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: be49de18297645009c1e2092f382a670, type: 3}
|
||||
m_Name: SFXListConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.SFXListConfig
|
||||
SFX:
|
||||
- m_AssetGUID: 1d7110a045075b22fa27d62bd5f2784e
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
- m_AssetGUID: 3831a36e0c8e48f659517a6bb99378b6
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 119db0053fbf48c099ae222c15afccce
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6d4b28e4552d456d99550b6d91467345, type: 3}
|
||||
m_Name: SoundtrackListConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.SoundtrackListConfig
|
||||
peacefulSoundtrack:
|
||||
- m_AssetGUID: 803e40b883c823b89a91aa8b9d9fc483
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
actionSoundtrack:
|
||||
- m_AssetGUID: ebe18293a5ef86704b23dad3a1786476
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
menuSoundtrack:
|
||||
- m_AssetGUID: 803e40b883c823b89a91aa8b9d9fc483
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26c0b7626862cbe758a0421cf719da59
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -147,7 +147,7 @@ Transform:
|
||||
m_GameObject: {fileID: 212553749}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.99403006, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0.989, y: 0, z: -0}
|
||||
m_LocalScale: {x: 0.1, y: 1, z: 0.3}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -371,7 +371,7 @@ Transform:
|
||||
m_GameObject: {fileID: 991876314}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: -2.359, y: 0.982, z: 3.204}
|
||||
m_LocalPosition: {x: -2.359, y: 0.982, z: 3.197}
|
||||
m_LocalScale: {x: 0.3, y: 1, z: 0.2}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -514,7 +514,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1220410323}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.003, y: 0, z: -0}
|
||||
m_LocalPosition: {x: -0.008, y: 0, z: -0}
|
||||
m_LocalScale: {x: 0.1, y: 1, z: 0.3}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -717,7 +717,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1372199851}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: -0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: -1.371, y: 0.977, z: 1.694}
|
||||
m_LocalPosition: {x: -1.371, y: 0.977, z: 1.699}
|
||||
m_LocalScale: {x: 0.2, y: 1, z: 0.2}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -751,7 +751,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2050798864}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 1.99, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 1.985, y: 0, z: -0}
|
||||
m_LocalScale: {x: 0.1, y: 1, z: 0.3}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21b7413ba9498cef4a17c854150b8a02
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,131 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &7972208015551953404
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4517388324116496493}
|
||||
- component: {fileID: 6551050329024541224}
|
||||
m_Layer: 0
|
||||
m_Name: AudioSource
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4517388324116496493
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7972208015551953404}
|
||||
serializedVersion: 2
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &6551050329024541224
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7972208015551953404}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
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
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9293380a88bf6736889be29722b94269
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ba8f20a511ea44ca90ef109343ec372
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc62971a4558a785ea5392d234a9a9e6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db394703d6db2aa8c88f18ca5bffec9c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eeed60fb66146ee72b7b580aeb4982b0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b7246d087a431d9485cdb8a61eaf9dd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user