Now Audio Playing
This commit is contained in:
1 parent
b7527d8d68
commit
513d6d0bc5
62 files changed
+1170
-121
No files matched your search
@@ -2,6 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="RiderProjectSettingsUpdater">
|
||||
<option name="singleClickDiffPreview" value="1" />
|
||||
<option name="unhandledExceptionsIgnoreList" value="1" />
|
||||
<option name="vcsConfiguration" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
+89
-59
@@ -5,17 +5,35 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="ed1a3c4f-83ac-4211-ae32-004a26afd5d8" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioService.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioService.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourcePool.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourcePool.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourceSettings.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourceSettings.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourceType.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourceType.cs.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.Infratest/.idea/projectSettingsUpdater.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Infratest/.idea/projectSettingsUpdater.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.Infratest/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Infratest/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/AddressableAssetsData/AddressableAssetSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/AddressableAssetsData/AddressableAssetSettings.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/AppStateMachine.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/AppStateMachine.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/PapaInstaller.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/PapaInstaller.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/EventBus/EventBus.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/EventBus/EventBus.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/ProjectScope.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/ProjectScope.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/ReflexSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/ReflexSettings.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/ReflexSettings.asset.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/ReflexSettings.asset.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scenes/Bootstrap.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Bootstrap.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scenes/Gameplay.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Gameplay.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/BootstrapState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/BootstrapState.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioFactory.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIPanel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIPanel.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/SystemConfigsReferences.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/SystemConfigsReferences.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/Code.Infrastructure.App.AppStateMachine.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/Code.Infrastructure.App.AppStateMachine.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Packages/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/manifest.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ProjectSettings/ShaderGraphSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/ShaderGraphSettings.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ProjectSettings/PackageManagerSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/PackageManagerSettings.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -23,24 +41,19 @@
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="DpaMonitoringSettings">
|
||||
<option name="autoShow" value="false" />
|
||||
<option name="firstShow" value="false" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioService.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourcePool.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourceSettings.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Loadings/Loading.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.cysharp.unitask@a85b92a8e443/Runtime/External/Addressables/AddressablesAsyncExtensions.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.cysharp.unitask@a85b92a8e443/Runtime/UniTaskScheduler.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@45e9abf44299/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@45e9abf44299/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@45e9abf44299/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@45e9abf44299/Runtime/ResourceManager/Util/DelegateList.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@45e9abf44299/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1eb9db207454431c84a47bcd81e79c3746ae00/50/ee0759d6/Dictionary`2.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/493b407efcb64dddad59f28bb0b831d3212400/1d/b6f4672d/Vector2.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/493b407efcb64dddad59f28bb0b831d3212400/e6/06b4bbec/Component.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/6faa6124236442759eb396cfbfdad50810fc00/3f/3a201145/Enumerable.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@13d9ede188ab/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"customColor": "",
|
||||
@@ -55,8 +68,9 @@
|
||||
"keyToString": {
|
||||
"Attach to Unity Editor.Attach to Unity Editor.executor": "Debug",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"XThreadsFramesViewSplitterKey": "0.31173185",
|
||||
"git-widget-placeholder": "NotLiminalOne",
|
||||
"git-widget-placeholder": "NotLiminalPCG",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
@@ -67,19 +81,27 @@
|
||||
}</component>
|
||||
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
||||
<configuration name="Start Unity" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.1f1\Editor\Unity.exe" />
|
||||
<option name="EXE_PATH" value="$USER_HOME$/Unity/Hub/Editor/6000.3.5f2/Editor/Unity" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-projectPath A:\Projects\Infratest -debugCodeOptimization" />
|
||||
<option name="WORKING_DIRECTORY" value="A:\Projects\Infratest" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="ENV_FILE_PATHS" value="" />
|
||||
<option name="REDIRECT_INPUT_PATH" value="" />
|
||||
<option name="PTY_MODE" value="Auto" />
|
||||
<option name="MIXED_MODE_DEBUG" value="0" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Unit Tests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.1f1\Editor\Unity.exe" />
|
||||
<option name="EXE_PATH" value="$USER_HOME$/Unity/Hub/Editor/6000.3.5f2/Editor/Unity" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-runTests -batchmode -projectPath A:\Projects\Infratest -testResults Logs/results.xml -logFile Logs/Editor.log -testPlatform EditMode -debugCodeOptimization" />
|
||||
<option name="WORKING_DIRECTORY" value="A:\Projects\Infratest" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="ENV_FILE_PATHS" value="" />
|
||||
<option name="REDIRECT_INPUT_PATH" value="" />
|
||||
<option name="PTY_MODE" value="Auto" />
|
||||
<option name="MIXED_MODE_DEBUG" value="0" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor & Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost">
|
||||
@@ -87,19 +109,32 @@
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="runtimes">
|
||||
<list />
|
||||
</option>
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="useMixedMode" value="false" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost">
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="9791">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" />
|
||||
<option name="pid" value="9791" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="runtimes">
|
||||
<list>
|
||||
<MonoRuntime />
|
||||
</list>
|
||||
</option>
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="useMixedMode" value="false" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Device" type="UnityDevicePlayer" factoryName="UnityAttachToDevicePlayer">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -146,6 +181,10 @@
|
||||
<workItem from="1768124782138" duration="5579000" />
|
||||
<workItem from="1768228201670" duration="4137000" />
|
||||
<workItem from="1768237217087" duration="2844000" />
|
||||
<workItem from="1769439297620" duration="1762000" />
|
||||
<workItem from="1769443636668" duration="4743000" />
|
||||
<workItem from="1769457001410" duration="1827000" />
|
||||
<workItem from="1769468220482" duration="3957000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
@@ -168,55 +207,46 @@
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Liminal/Character/LiminalCharacterController.cs</url>
|
||||
<line>239</line>
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'">
|
||||
<startOffsets>
|
||||
<option value="8514" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="8672" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'" />
|
||||
<option name="timeStamp" value="57" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Liminal/Character/LiminalCharacterController.cs</url>
|
||||
<line>245</line>
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'">
|
||||
<startOffsets>
|
||||
<option value="8967" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="9010" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'" />
|
||||
<option name="timeStamp" value="58" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraFactory.cs</url>
|
||||
<line>50</line>
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Infrastructure\Camera\CameraFactory.cs" containingFunctionPresentation="Method 'CreateCameraStateMachine'">
|
||||
<startOffsets>
|
||||
<option value="2190" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2295" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="60" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraFactory.cs</url>
|
||||
<line>35</line>
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Infrastructure\Camera\CameraFactory.cs" containingFunctionPresentation="Method 'CreateCameraStateMachine'">
|
||||
<startOffsets>
|
||||
<option value="1345" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="1495" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Infrastructure\Camera\CameraFactory.cs" containingFunctionPresentation="Method 'CreateCameraStateMachine'" />
|
||||
<option name="timeStamp" value="61" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioService.cs</url>
|
||||
<line>40</line>
|
||||
<properties documentPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioService.cs" containingFunctionPresentation="Method 'AudioClipsLoaded'">
|
||||
<startOffsets>
|
||||
<option value="1390" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="1463" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="68" />
|
||||
</line-breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.OperationCanceledException" breakIfHandledByOtherCode="false" displayValue="System.OperationCanceledException" />
|
||||
<option name="timeStamp" value="62" />
|
||||
</breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.Threading.Tasks.TaskCanceledException" breakIfHandledByOtherCode="false" displayValue="System.Threading.Tasks.TaskCanceledException" />
|
||||
<option name="timeStamp" value="63" />
|
||||
</breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.Threading.ThreadAbortException" breakIfHandledByOtherCode="false" displayValue="System.Threading.ThreadAbortException" />
|
||||
<option name="timeStamp" value="64" />
|
||||
</breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RiderProjectSettingsUpdater">
|
||||
<option name="singleClickDiffPreview" value="1" />
|
||||
<option name="unhandledExceptionsIgnoreList" value="1" />
|
||||
<option name="vcsConfiguration" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+90
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f63980da-ead4-405c-827d-acf0244b2268" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Packages/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/manifest.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioFactory.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 3
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="38nZCoa05XMGjvCiidouET2bKxO" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"git-widget-placeholder": "NotLiminalPCG",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="f63980da-ead4-405c-827d-acf0244b2268" name="Changes" comment="" />
|
||||
<created>1769437172471</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1769437172471</updated>
|
||||
<workItem from="1769437174936" duration="1797000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
|
||||
<component name="UnityProjectDiscoverer">
|
||||
<option name="unityProjectFolder" value="true" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.OperationCanceledException" breakIfHandledByOtherCode="false" displayValue="System.OperationCanceledException" />
|
||||
<option name="timeStamp" value="1" />
|
||||
</breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.Threading.Tasks.TaskCanceledException" breakIfHandledByOtherCode="false" displayValue="System.Threading.Tasks.TaskCanceledException" />
|
||||
<option name="timeStamp" value="2" />
|
||||
</breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.Threading.ThreadAbortException" breakIfHandledByOtherCode="false" displayValue="System.Threading.ThreadAbortException" />
|
||||
<option name="timeStamp" value="3" />
|
||||
</breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,16 @@
|
||||
%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: dea69d41f90c6ea4fa55c27c1d60c145, type: 3}
|
||||
m_Name: AddressableAssetGroupSortSettings
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.AddressableAssetGroupSortSettings
|
||||
sortOrder:
|
||||
- d790534e015d692428ac5a9ce7d2ceb6
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4769b93af55e1195a9506acfa3d9c28
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: d790534e015d692428ac5a9ce7d2ceb6
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: e468f985d563957211af2aa30c8022ce
|
||||
Hash: 5c0b3de6b8f117471ad9b1bb8d9f282a
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
@@ -104,6 +104,8 @@ MonoBehaviour:
|
||||
- CameraConfig
|
||||
- UIPanelConfig
|
||||
- PostProccessVolume
|
||||
- AudioInfoConfig
|
||||
- AudioSettingsConfig
|
||||
m_SchemaTemplates: []
|
||||
m_GroupTemplateObjects:
|
||||
- {fileID: 11400000, guid: af0b5782a0090884db056705d7776701, type: 2}
|
||||
|
||||
@@ -15,6 +15,11 @@ MonoBehaviour:
|
||||
m_GroupName: Default Local Group
|
||||
m_GUID: d790534e015d692428ac5a9ce7d2ceb6
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 0f5388dd5b953e74281733a43c9bca5a
|
||||
m_Address: Audio/UI/01. Wake Up, Get Up, Get Out There
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 13852bf3f3ccace4e9deefd844eebb23
|
||||
m_Address: Assets/Resources_moved/UI/Panels/LoadingPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -25,6 +30,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2471ee3760db4ecfe8c313bb2c00daf0
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Audio Source.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 30778c5a4d5c3f74bac4e5340344cdad
|
||||
m_Address: Assets/Resources_moved/Configs/Volumes/MenuRetro.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -49,11 +59,24 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- SceneConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4bf97e6c7f046f849912182e4ded6c9e
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Settings/AudioSourceSettingsConfig
|
||||
1.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- AudioSettingsConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4fcdb7f979b60194db1fb5c03b81bf8c
|
||||
m_Address: UI/Panels/LoadingPanel
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 62388720cc90ef87f9d8ed5328dbc6fe
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/AudioInfoConfig.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- AudioInfoConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 86d0b6ef35383e7409df5a352637fea7
|
||||
m_Address: UI/Panels/SceneSelectPanel
|
||||
m_ReadOnly: 0
|
||||
@@ -100,6 +123,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d7dd69cfadda3d6e18ec390724be0d80
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/AudioSourcePrefabConfig.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d87857258eeea2345a3b926b3c671002
|
||||
m_Address: Assets/Resources_moved/Configs/UI/Loading.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -127,6 +155,12 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- UIPanelConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ec0362c4c0d045cccbe89aee2231c3be
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Settings/AudioSourceSettingsConfig.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- AudioSettingsConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f146779bcd07c524097072c871162bff
|
||||
m_Address: Assets/Resources_moved/Configs/Camera/FPSConfig.asset
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5313cc04f8ca14597b338b65bee3093d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,4 @@
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.UI;
|
||||
using Reflex.Attributes;
|
||||
@@ -16,6 +17,8 @@ namespace Code.Infrastructure.App
|
||||
[Inject] public SceneLoader.SceneLoader SceneLoader { get; set; }
|
||||
[Inject] public CameraStateMachine Camera { get; set; }
|
||||
[Inject] public IUIService UIService { get; set; }
|
||||
[Inject] public IAudioFactory AudioFactory { get; set; }
|
||||
[Inject] public IAudioService AudioService { get; set; }
|
||||
}
|
||||
|
||||
[Generators.StateMachine(typeof(AppStateMachineContext),typeof(AppStates))]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.Input;
|
||||
@@ -21,7 +22,9 @@ namespace Code.Infrastructure.App
|
||||
IUIInitializedHandle,
|
||||
IUIPanelLoaded,
|
||||
IVolumesInitializedHandle,
|
||||
IVolumeLoaded
|
||||
IVolumeLoaded,
|
||||
IAudioSourcePoolInitializedHandle,
|
||||
IAudioConfigsLoadedHandle
|
||||
{
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
@@ -51,6 +54,13 @@ namespace Code.Infrastructure.App
|
||||
containerBuilder.RegisterType(typeof(VolumeFactory), new[] { typeof(IVolumeFactory) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
|
||||
containerBuilder.RegisterType(typeof(AudioFactory), new[] { typeof(IAudioFactory) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(AudioSourcePool), new[] { typeof(IAudioSourcePool) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(AudioService), new[] { typeof(IAudioService) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
|
||||
// UIFactory
|
||||
// Logo
|
||||
// Scene configs
|
||||
@@ -58,7 +68,9 @@ namespace Code.Infrastructure.App
|
||||
// Camera
|
||||
// Volume Factory
|
||||
// Loading volume
|
||||
_initialLoading = new Loading(7, () => EssentialLoadEnded(_thatRightContainer));
|
||||
// Audio Factory
|
||||
// Audio Pool
|
||||
_initialLoading = new Loading(9, () => EssentialLoadEnded(_thatRightContainer));
|
||||
_ui2CamLoading = new Loading(2,
|
||||
() =>
|
||||
{
|
||||
@@ -156,5 +168,15 @@ namespace Code.Infrastructure.App
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void AudioSourcePoolInitialized()
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
|
||||
public void AudioConfigsLoaded()
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Generators;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.Infrastructure.App.States
|
||||
{
|
||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
||||
[StateRaisingEvent]
|
||||
public partial class BootstrapState : IOnGameplaySceneLoadedHandler, IUIPanelLoaded
|
||||
public partial class BootstrapState : IOnGameplaySceneLoadedHandler, IUIPanelLoaded, IReadyToPlayHandle
|
||||
{
|
||||
private EventBus.EventBus _eventBus;
|
||||
public BootstrapState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
|
||||
@@ -24,11 +21,13 @@ namespace Code.Infrastructure.App.States
|
||||
_eventBus.Subscribe(this);
|
||||
|
||||
Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser);
|
||||
Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
|
||||
// Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget();
|
||||
}
|
||||
|
||||
protected override void OnExitState()
|
||||
{
|
||||
Context.AudioFactory.ReleaseAudios(AudioNames.UISounds);
|
||||
Context.UIService.TryRemovePanel(UIPanelType.DebugSceneChooser);
|
||||
_eventBus.Unsubscribe(this);
|
||||
}
|
||||
@@ -44,5 +43,10 @@ namespace Code.Infrastructure.App.States
|
||||
|
||||
Context.UIService.OpenPanel(uiPanelType);
|
||||
}
|
||||
|
||||
public void OnReadyToPlay(AudioNames groupName)
|
||||
{
|
||||
Context.AudioService.PlayTest();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,102 @@
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
public class AudioFactory
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
|
||||
namespace Code.Infrastructure.Audio
|
||||
{
|
||||
public interface IAudioFactory
|
||||
{
|
||||
UniTaskVoid LoadAudioClips(AudioNames groupName);
|
||||
void ReleaseAudios(AudioNames groupName);
|
||||
}
|
||||
|
||||
public class AudioFactory : IAudioFactory, IDisposable
|
||||
{
|
||||
private string _label;
|
||||
private Dictionary<AudioNames, Dictionary<int, AssetReference>> _audioInfos = new();
|
||||
|
||||
private Dictionary<AudioNames, Dictionary<int, AsyncOperationHandle<AudioClip>>> _clipsHandles = new();
|
||||
private AsyncOperationHandle<IList<AudioInfoConfig>> _configsHandle;
|
||||
private EventBus.EventBus _eventBus;
|
||||
|
||||
public AudioFactory(IConfigLocator configLocator, EventBus.EventBus eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
_label = configLocator.TryGetManyConfigAssetReferences<AudioInfoConfig>();
|
||||
|
||||
for (var i = 0; i < typeof(AudioNames).GetEnumValues().Length; i++)
|
||||
{
|
||||
_audioInfos.Add((AudioNames)i, new Dictionary<int, AssetReference>());
|
||||
_clipsHandles.Add((AudioNames)i, new Dictionary<int, AsyncOperationHandle<AudioClip>>());
|
||||
}
|
||||
|
||||
LoadConfigs().Forget();
|
||||
}
|
||||
|
||||
private async UniTaskVoid LoadConfigs()
|
||||
{
|
||||
_configsHandle = Addressables.LoadAssetsAsync<AudioInfoConfig>(_label);
|
||||
|
||||
await _configsHandle.ToUniTask();
|
||||
|
||||
foreach (AudioInfoConfig config in _configsHandle.Result)
|
||||
_audioInfos[config.GroupName].Add(config.id, config.fileReference);
|
||||
|
||||
_eventBus.RaiseEvent<IAudioConfigsLoadedHandle>(ui => ui.AudioConfigsLoaded());
|
||||
}
|
||||
|
||||
public async UniTaskVoid LoadAudioClips(AudioNames groupName)
|
||||
{
|
||||
foreach (var audioInfo in _audioInfos[groupName])
|
||||
if (!_clipsHandles[groupName].ContainsKey(audioInfo.Key))
|
||||
_clipsHandles[groupName].Add(audioInfo.Key, Addressables.LoadAssetAsync<AudioClip>(audioInfo.Value));
|
||||
else
|
||||
_clipsHandles[groupName][audioInfo.Key] = Addressables.LoadAssetAsync<AudioClip>(audioInfo.Value);
|
||||
|
||||
foreach (var handle in _clipsHandles[groupName])
|
||||
await handle.Value.ToUniTask();
|
||||
|
||||
_eventBus.RaiseEvent<IAudioClipsEventHandle>(ui =>
|
||||
ui.AudioClipsLoaded(groupName, _clipsHandles[groupName].ToDictionary(
|
||||
x => x.Key,
|
||||
x => x.Value.Result)));
|
||||
}
|
||||
|
||||
public void ReleaseAudios(AudioNames groupName)
|
||||
{
|
||||
_eventBus.RaiseEvent<IAudioClipsEventHandle>(x=> x.AudioClipsUnLoaded(groupName));
|
||||
|
||||
foreach (var handle in _clipsHandles)
|
||||
Addressables.Release(handle.Value);
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var handles in _clipsHandles)
|
||||
{
|
||||
foreach (var handle in handles.Value)
|
||||
{
|
||||
handle.Value.Release();
|
||||
}
|
||||
}
|
||||
|
||||
_configsHandle.Release();
|
||||
}
|
||||
}
|
||||
|
||||
internal interface IAudioConfigsLoadedHandle : IGlobalSubscriber
|
||||
{
|
||||
void AudioConfigsLoaded();
|
||||
}
|
||||
|
||||
internal interface IAudioClipsEventHandle : IGlobalSubscriber
|
||||
{
|
||||
void AudioClipsLoaded(AudioNames groupName, Dictionary<int, AudioClip> toDictionary);
|
||||
void AudioClipsUnLoaded(AudioNames groupName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Code.Infrastructure.Generators;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Audio
|
||||
{
|
||||
[Config("Configs/Audio/AudioInfo", true)]
|
||||
public class AudioInfo
|
||||
{
|
||||
[ToConfig] public AudioNames GroupName;
|
||||
[ToConfig] public int id;
|
||||
[ToConfig] public AssetReference fileReference;
|
||||
}
|
||||
[Config("Configs/Audio/AudioSource")]
|
||||
public class AudioSourcePrefab
|
||||
{
|
||||
[ToConfig] public AssetReference prefabReference;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 821f8c193f8846568335e415bf1e7ced
|
||||
timeCreated: 1769437653
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Code.Infrastructure.Audio
|
||||
{
|
||||
public enum AudioNames
|
||||
{
|
||||
UISounds,
|
||||
EnemySFX
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88f7326e5bec4c97b2a70228dcd9f899
|
||||
timeCreated: 1769437552
|
||||
@@ -0,0 +1,54 @@
|
||||
using System.Collections.Generic;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Infrastructure.Audio
|
||||
{
|
||||
public interface IAudioService
|
||||
{
|
||||
AudioClip GetClip(AudioNames groupName, int id);
|
||||
void PlayTest();
|
||||
}
|
||||
|
||||
public class AudioService : IAudioClipsEventHandle, IAudioService
|
||||
{
|
||||
private EventBus.EventBus _eventBus;
|
||||
private IAudioFactory _audioFactory;
|
||||
private IAudioSourcePool _pool;
|
||||
private Dictionary<AudioNames, Dictionary<int, AudioClip>> _audioClips = new();
|
||||
|
||||
public AudioService(EventBus.EventBus eventBus, IAudioFactory audioFactory, IAudioSourcePool pool)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
_audioFactory = audioFactory;
|
||||
_pool = pool;
|
||||
|
||||
_eventBus.Subscribe(this);
|
||||
|
||||
for (int i = 0; i < typeof(AudioNames).GetEnumValues().Length; i++)
|
||||
_audioClips.Add((AudioNames)i, new Dictionary<int, AudioClip>());
|
||||
}
|
||||
|
||||
public void PlayTest()
|
||||
{
|
||||
_pool.GetSource(AudioSourceType.NoBlend).PlayOneShot(GetClip(AudioNames.UISounds, 0));
|
||||
}
|
||||
public AudioClip GetClip(AudioNames groupName, int id) => _audioClips[groupName][id];
|
||||
|
||||
public void AudioClipsLoaded(AudioNames groupname, Dictionary<int, AudioClip> clips)
|
||||
{
|
||||
_audioClips[groupname] = clips;
|
||||
_eventBus.RaiseEvent<IReadyToPlayHandle>(x=> x.OnReadyToPlay(groupname));
|
||||
}
|
||||
|
||||
public void AudioClipsUnLoaded(AudioNames groupName)
|
||||
{
|
||||
_audioClips[groupName] = null;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IReadyToPlayHandle : IGlobalSubscriber
|
||||
{
|
||||
void OnReadyToPlay(AudioNames groupName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8426c9e925a431aa73069c49d6a71c0
|
||||
timeCreated: 1769446252
|
||||
@@ -0,0 +1,179 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.Pool;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Code.Infrastructure.Audio
|
||||
{
|
||||
public interface IAudioSourcePool
|
||||
{
|
||||
AudioSource GetSource(AudioSourceType sourceType);
|
||||
void ReleaseSource(AudioSource source);
|
||||
}
|
||||
|
||||
public class AudioSourcePool : IAudioSourcePool, IDisposable
|
||||
{
|
||||
// The pool holds plain GameObjects (you can swap this for any component type).
|
||||
private IObjectPool<AudioSource> _pool;
|
||||
private GameObject _sourcePrefab;
|
||||
|
||||
private Dictionary<AudioSourceType, AudioSourceSettingsConfig> _settings;
|
||||
|
||||
public AudioSourcePool(Dictionary<AudioSourceType, AudioSourceSettingsConfig> settings) => _settings = settings;
|
||||
|
||||
private string _configsLabel;
|
||||
private AsyncOperationHandle<IList<AudioSourceSettingsConfig>> _handles;
|
||||
private AssetReference _sourcePrefabConfigReference;
|
||||
private AsyncOperationHandle<AudioSourcePrefabConfig> _prefabConfigHandle;
|
||||
private AsyncOperationHandle<GameObject> _prefabHandle;
|
||||
private EventBus.EventBus _eventBus;
|
||||
|
||||
public AudioSourcePool(IConfigLocator configLocator, EventBus.EventBus eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
|
||||
_configsLabel = configLocator.TryGetManyConfigAssetReferences<AudioSourceSettingsConfig>();
|
||||
_sourcePrefabConfigReference = configLocator.TryGetConfigAssetReference<AudioSourcePrefabConfig>();
|
||||
|
||||
LoadConfigs().Forget();
|
||||
}
|
||||
|
||||
private async UniTaskVoid LoadConfigs()
|
||||
{
|
||||
_prefabConfigHandle = Addressables.LoadAssetAsync<AudioSourcePrefabConfig>(_sourcePrefabConfigReference);
|
||||
_handles = Addressables.LoadAssetsAsync<AudioSourceSettingsConfig>(_configsLabel);
|
||||
|
||||
await UniTask.WhenAll(
|
||||
_prefabConfigHandle.ToUniTask(),
|
||||
_handles.ToUniTask());
|
||||
|
||||
_prefabHandle = Addressables.LoadAssetAsync<GameObject>(_prefabConfigHandle.Result.prefabReference);
|
||||
|
||||
_settings = _handles.Result.ToDictionary(x => x.sourceType);
|
||||
|
||||
await _prefabHandle.ToUniTask();
|
||||
|
||||
_pool = new ObjectPool<AudioSource>(
|
||||
createFunc: CreateItem,
|
||||
// actionOnGet: OnGet,
|
||||
actionOnRelease: OnRelease,
|
||||
actionOnDestroy: OnDestroyItem,
|
||||
collectionCheck: true, // helps catch double-release mistakes
|
||||
defaultCapacity: 10,
|
||||
maxSize: 20
|
||||
);
|
||||
|
||||
_eventBus.RaiseEvent<IAudioSourcePoolInitializedHandle>(x => x.AudioSourcePoolInitialized());
|
||||
}
|
||||
// Creates a new pooled GameObject the first time (and whenever the pool needs more).
|
||||
private AudioSource CreateItem()
|
||||
{
|
||||
var audioSource = Object.Instantiate(_prefabHandle.Result).GetComponent<AudioSource>();
|
||||
audioSource.name = "PooledAudioSource";
|
||||
Object.DontDestroyOnLoad(audioSource);
|
||||
return audioSource;
|
||||
}
|
||||
|
||||
// Called when an item is taken from the pool.
|
||||
private void OnGet(AudioSource source)
|
||||
{
|
||||
//source.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
// Called when an item is returned to the pool.
|
||||
private void OnRelease(AudioSource source)
|
||||
{
|
||||
source.Stop();
|
||||
//source.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// Called when the pool decides to destroy an item (e.g., above max size).
|
||||
private void OnDestroyItem(AudioSource source)
|
||||
{
|
||||
Object.Destroy(source.gameObject);
|
||||
}
|
||||
//
|
||||
// public async UniTaskVoid PlayOneShot(AudioClip clip, Vector3 position, AudioMixerGroup audioMixerGroup, AudioSourceType audioSourceType = AudioSourceType.NoBlend, Action onComplete = null)
|
||||
// {
|
||||
// AudioSource source = _pool.Get();
|
||||
// source.PlayOneShot(clip);
|
||||
// source.spatialBlend = _settings[audioSourceType].spatialBlend;
|
||||
// source.transform.position = position;
|
||||
// source.outputAudioMixerGroup = audioMixerGroup;
|
||||
//
|
||||
// await UniTask.WaitUntilValueChanged(source, x => x.isPlaying);
|
||||
// onComplete?.Invoke();
|
||||
// _pool.Release(source);
|
||||
// }
|
||||
// public async UniTaskVoid PlayOneShot(AudioClip clip, AudioMixerGroup audioMixerGroup, AudioSourceType audioSourceType = AudioSourceType.NoBlend, Action onComplete = null)
|
||||
// {
|
||||
// AudioSource source = _pool.Get();
|
||||
// source.PlayOneShot(clip);
|
||||
// source.spatialBlend = _settings[audioSourceType].spatialBlend;
|
||||
// source.outputAudioMixerGroup = audioMixerGroup;
|
||||
//
|
||||
// await UniTask.WaitUntilValueChanged(source, x => x.isPlaying);
|
||||
// onComplete?.Invoke();
|
||||
// _pool.Release(source);
|
||||
// }
|
||||
// public async UniTaskVoid PlayOneShot(AudioSource audioSource, AudioClip clip, AudioMixerGroup audioMixerGroup, AudioSourceType audioSourceType = AudioSourceType.NoBlend, Action onComplete = null)
|
||||
// {
|
||||
// audioSource.PlayOneShot(clip);
|
||||
// audioSource.spatialBlend = _settings[audioSourceType].spatialBlend;
|
||||
// audioSource.outputAudioMixerGroup = audioMixerGroup;
|
||||
//
|
||||
// // TODO Потом сделать. Можно с cancellation, но сейчас лень. Ну правда
|
||||
// await UniTask.WaitUntilValueChanged(audioSource, x => x.isPlaying);
|
||||
//
|
||||
// if (!audioSource) return;
|
||||
//
|
||||
// _pool.Release(audioSource);
|
||||
// onComplete?.Invoke();
|
||||
// }
|
||||
// public async UniTaskVoid PlayOneShot(AudioClip clip, AudioMixerGroup audioMixerGroup, CancellationTokenSource cancellationToken, AudioSourceType audioSourceType = AudioSourceType.NoBlend, Action onComplete = null)
|
||||
// {
|
||||
// AudioSource source = _pool.Get();
|
||||
// source.PlayOneShot(clip);
|
||||
// source.spatialBlend = _settings[audioSourceType].spatialBlend;
|
||||
// source.outputAudioMixerGroup = audioMixerGroup;
|
||||
//
|
||||
// var (isCanceled, _) = await UniTask.WaitUntilValueChanged(source, x => x.isPlaying, cancellationToken: cancellationToken.Token).SuppressCancellationThrow();
|
||||
//
|
||||
// _pool.Release(source);
|
||||
//
|
||||
// if(!isCanceled) onComplete?.Invoke();
|
||||
// else cancellationToken.Dispose();
|
||||
// }
|
||||
public AudioSource GetSource(AudioSourceType sourceType)
|
||||
{
|
||||
var source = _pool.Get();
|
||||
|
||||
source.spatialBlend = _settings[sourceType].spatialBlend;
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
public void ReleaseSource(AudioSource source) => _pool.Release(source);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Addressables.Release(_handles);
|
||||
Addressables.Release(_prefabConfigHandle);
|
||||
Addressables.Release(_sourcePrefab);
|
||||
}
|
||||
}
|
||||
|
||||
public interface IAudioSourcePoolInitializedHandle : IGlobalSubscriber
|
||||
{
|
||||
void AudioSourcePoolInitialized();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 246ae406fabc4ca791673d3f38cfe1c5
|
||||
timeCreated: 1769448041
|
||||
@@ -0,0 +1,13 @@
|
||||
using Code.Infrastructure.Generators;
|
||||
|
||||
namespace Code.Infrastructure.Audio
|
||||
{
|
||||
[Config("Configs/Audio/AudioSourceSettings", true)]
|
||||
public class AudioSourceSettings
|
||||
{
|
||||
// Дополнять по мере необходимости
|
||||
[ToConfig] public float spatialBlend;
|
||||
|
||||
[ToConfig] public AudioSourceType sourceType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76d9dd39cbe641dab0cfa8ed1f2007f4
|
||||
timeCreated: 1769448198
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Code.Infrastructure.Audio
|
||||
{
|
||||
public enum AudioSourceType
|
||||
{
|
||||
Full3D,
|
||||
NoBlend
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85f9cb99599f4399a1fd66496b5184d0
|
||||
timeCreated: 1769448254
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.ComponentModel;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Code.Infrastructure.UI
|
||||
{
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13f65a629e8c7e8c4a665474d64bd743
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5dee85ec17f52ef9795843350a175109
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -18,25 +18,33 @@ MonoBehaviour:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
CameraSettings: CameraConfig
|
||||
UIPanelSettings: UIPanelConfig
|
||||
GameCamera:
|
||||
m_AssetGUID: c42e39e2fb64cdd45b2ebc4b723d9d0c
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
CanvasSettings:
|
||||
m_AssetGUID: 17c5e56eb6c99db40b6093c9d543bb4f
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
GameCamera:
|
||||
m_AssetGUID: c42e39e2fb64cdd45b2ebc4b723d9d0c
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
InputService:
|
||||
m_AssetGUID: eab71c0cf90c4b94294e497d3734cfe1
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
AudioSourcePrefab:
|
||||
m_AssetGUID: d7dd69cfadda3d6e18ec390724be0d80
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
AudioInfo: AudioInfoConfig
|
||||
CameraSettings: CameraConfig
|
||||
UIPanelSettings: UIPanelConfig
|
||||
VolumeSettings: PostProccessVolume
|
||||
AudioSourceSettings: AudioSettingsConfig
|
||||
SceneInfo: SceneConfig
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71c6e3f3eca713f79aeab6d6d5f97a5c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2d053908c1e62df3a20c0dc82138a43
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f5388dd5b953e74281733a43c9bca5a
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8fcdf8416abd923e6bd56b3cae3e64a9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,131 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8652297258760236330
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 497122190607935989}
|
||||
- component: {fileID: 8953235124198601079}
|
||||
m_Layer: 0
|
||||
m_Name: Audio Source
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &497122190607935989
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8652297258760236330}
|
||||
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 &8953235124198601079
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8652297258760236330}
|
||||
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: 2471ee3760db4ecfe8c313bb2c00daf0
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
%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: ba4d0c0f70786a459b739ae33e66122a, type: 3}
|
||||
m_Name: AudioSourcePrefabConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Audio.AudioSourcePrefabConfig
|
||||
prefabReference:
|
||||
m_AssetGUID: 2471ee3760db4ecfe8c313bb2c00daf0
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7dd69cfadda3d6e18ec390724be0d80
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d71926e410ce41907b3cd545595812fb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
%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: a8b089dd854c0a084ba749d31f8b399f, type: 3}
|
||||
m_Name: AudioInfoConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Audio.AudioInfoConfig
|
||||
GroupName: 0
|
||||
id: 0
|
||||
fileReference:
|
||||
m_AssetGUID: 0f5388dd5b953e74281733a43c9bca5a
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 62388720cc90ef87f9d8ed5328dbc6fe
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edd23fce0ea3a7aa494e02195d8b3ed4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
%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: 85a3854301201dc0d93ecb89c2f30e92, type: 3}
|
||||
m_Name: Full3D
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Audio.AudioSourceSettingsConfig
|
||||
spatialBlend: 1
|
||||
sourceType: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bf97e6c7f046f849912182e4ded6c9e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
%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: 85a3854301201dc0d93ecb89c2f30e92, type: 3}
|
||||
m_Name: NoBlend
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Audio.AudioSourceSettingsConfig
|
||||
spatialBlend: 0
|
||||
sourceType: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec0362c4c0d045cccbe89aee2231c3be
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using Code.Infrastructure.Audio;
|
||||
using System;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Audio{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "AudioInfoConfig", menuName = "Configs/Audio/AudioInfo")]
|
||||
public class AudioInfoConfig : ScriptableObject
|
||||
{
|
||||
public Code.Infrastructure.Audio.AudioNames GroupName;
|
||||
public System.Int32 id;
|
||||
public UnityEngine.AddressableAssets.AssetReference fileReference;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8b089dd854c0a084ba749d31f8b399f
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Audio{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "AudioSourcePrefabConfig", menuName = "Configs/Audio/AudioSource")]
|
||||
public class AudioSourcePrefabConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.AddressableAssets.AssetReference prefabReference;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba4d0c0f70786a459b739ae33e66122a
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using System;
|
||||
using Code.Infrastructure.Audio;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Audio{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "AudioSourceSettingsConfig", menuName = "Configs/Audio/AudioSourceSettings")]
|
||||
public class AudioSourceSettingsConfig : ScriptableObject
|
||||
{
|
||||
public System.Single spatialBlend;
|
||||
public Code.Infrastructure.Audio.AudioSourceType sourceType;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85a3854301201dc0d93ecb89c2f30e92
|
||||
@@ -22,12 +22,12 @@ public partial class AppStateMachine : AbstractStateMachine<Code.Infrastructure.
|
||||
var stateBootstrapState = new BootstrapState(StateMachineContext,eventBus);
|
||||
States.Add(stateBootstrapState.myState, stateBootstrapState);
|
||||
|
||||
var stateGameplayState = new GameplayState(StateMachineContext,eventBus);
|
||||
States.Add(stateGameplayState.myState, stateGameplayState);
|
||||
|
||||
var stateMainMenuState = new MainMenuState(StateMachineContext,eventBus);
|
||||
States.Add(stateMainMenuState.myState, stateMainMenuState);
|
||||
|
||||
var stateGameplayState = new GameplayState(StateMachineContext,eventBus);
|
||||
States.Add(stateGameplayState.myState, stateGameplayState);
|
||||
|
||||
}
|
||||
|
||||
protected override bool CheckTransitionAllowed(Code.Infrastructure.App.AppStates nextState) => AllowedStates.HasFlag(nextState);
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
|
||||
using UnityEngine;
|
||||
#pragma warning restore CS0105
|
||||
@@ -20,19 +23,25 @@ using Code.Infrastructure.UI;
|
||||
{
|
||||
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>("SystemConfigsReferences");
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.UI.UIPanelSettingsConfig), systemConfigsReferences.UIPanelSettings);
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.UI.CanvasSettingsConfig), systemConfigsReferences.CanvasSettings);
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.Camera.GameCameraConfig), systemConfigsReferences.GameCamera);
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.Input.InputServiceConfig), systemConfigsReferences.InputService);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Volume.VolumeSettingsConfig), systemConfigsReferences.VolumeSettings);
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourcePrefabConfig), systemConfigsReferences.AudioSourcePrefab);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioInfoConfig), systemConfigsReferences.AudioInfo);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Camera.CameraSettingsConfig), systemConfigsReferences.CameraSettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.SceneLoader.SceneInfoConfig), systemConfigsReferences.SceneInfo);
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.UI.UIPanelSettingsConfig), systemConfigsReferences.UIPanelSettings);
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.UI.CanvasSettingsConfig), systemConfigsReferences.CanvasSettings);
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Volume.VolumeSettingsConfig), systemConfigsReferences.VolumeSettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourceSettingsConfig), systemConfigsReferences.AudioSourceSettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.SceneLoader.SceneInfoConfig), systemConfigsReferences.SceneInfo);
|
||||
|
||||
//_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
|
||||
}
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
|
||||
using UnityEngine.AddressableAssets;
|
||||
#pragma warning restore CS0105
|
||||
@@ -14,13 +17,16 @@ using Code.Infrastructure.UI;
|
||||
namespace Code.Infrastructure.Configs{
|
||||
public partial class SystemConfigsReferences
|
||||
{
|
||||
public string UIPanelSettings;
|
||||
public AssetReference CanvasSettings;
|
||||
public AssetReference GameCamera;
|
||||
public AssetReference InputService;
|
||||
public string VolumeSettings;
|
||||
public AssetReference AudioSourcePrefab;
|
||||
public string AudioInfo;
|
||||
public string CameraSettings;
|
||||
public string UIPanelSettings;
|
||||
public string VolumeSettings;
|
||||
public string AudioSourceSettings;
|
||||
public string SceneInfo;
|
||||
public AssetReference CanvasSettings;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,15 +4,15 @@
|
||||
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
|
||||
"com.gustavopsantos.reflex": "https://github.com/gustavopsantos/reflex.git?path=/Assets/Reflex/#14.0.0",
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.addressables": "2.7.6",
|
||||
"com.unity.addressables": "2.8.0",
|
||||
"com.unity.ai.navigation": "2.0.9",
|
||||
"com.unity.collab-proxy": "2.10.2",
|
||||
"com.unity.collab-proxy": "2.11.2",
|
||||
"com.unity.ide.rider": "3.0.38",
|
||||
"com.unity.inputsystem": "1.17.0",
|
||||
"com.unity.multiplayer.center": "1.0.1",
|
||||
"com.unity.render-pipelines.universal": "17.3.0",
|
||||
"com.unity.test-framework": "1.6.0",
|
||||
"com.unity.timeline": "1.8.9",
|
||||
"com.unity.timeline": "1.8.10",
|
||||
"com.unity.ugui": "2.0.0",
|
||||
"com.unity.visualscripting": "1.9.9",
|
||||
"com.unity.modules.accessibility": "1.0.0",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.addressables": {
|
||||
"version": "2.7.6",
|
||||
"version": "2.8.0",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
@@ -38,7 +38,7 @@
|
||||
"com.unity.modules.jsonserialize": "1.0.0",
|
||||
"com.unity.modules.imageconversion": "1.0.0",
|
||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||
"com.unity.scriptablebuildpipeline": "2.5.0",
|
||||
"com.unity.scriptablebuildpipeline": "2.5.1",
|
||||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
@@ -53,7 +53,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.burst": {
|
||||
"version": "1.8.26",
|
||||
"version": "1.8.27",
|
||||
"depth": 2,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
@@ -63,7 +63,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.collab-proxy": {
|
||||
"version": "2.10.2",
|
||||
"version": "2.11.2",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
@@ -168,7 +168,7 @@
|
||||
}
|
||||
},
|
||||
"com.unity.scriptablebuildpipeline": {
|
||||
"version": "2.5.0",
|
||||
"version": "2.5.1",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
@@ -214,7 +214,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.timeline": {
|
||||
"version": "1.8.9",
|
||||
"version": "1.8.10",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
||||
@@ -12,11 +12,13 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EnablePreviewPackages: 0
|
||||
m_EnablePackageDependencies: 0
|
||||
m_EnablePreReleasePackages: 0
|
||||
m_AdvancedSettingsExpanded: 1
|
||||
m_ScopedRegistriesSettingsExpanded: 1
|
||||
m_SeeAllPackageVersions: 0
|
||||
m_DismissPreviewPackagesInUse: 0
|
||||
oneTimeWarningShown: 0
|
||||
oneTimePackageErrorsPopUpShown: 1
|
||||
m_Registries:
|
||||
- m_Id: main
|
||||
m_Name:
|
||||
@@ -24,20 +26,15 @@ MonoBehaviour:
|
||||
m_Scopes: []
|
||||
m_IsDefault: 1
|
||||
m_Capabilities: 7
|
||||
m_ConfigSource: 0
|
||||
m_Compliance:
|
||||
m_Status: 0
|
||||
m_Violations: []
|
||||
m_UserSelectedRegistryName:
|
||||
m_UserAddingNewScopedRegistry: 0
|
||||
m_RegistryInfoDraft:
|
||||
m_ErrorMessage:
|
||||
m_Original:
|
||||
m_Id:
|
||||
m_Name:
|
||||
m_Url:
|
||||
m_Scopes: []
|
||||
m_IsDefault: 0
|
||||
m_Capabilities: 0
|
||||
m_Modified: 0
|
||||
m_Name:
|
||||
m_Url:
|
||||
m_Scopes:
|
||||
-
|
||||
m_SelectedScopeIndex: 0
|
||||
m_ErrorMessage:
|
||||
m_UserModificationsInstanceId: -894
|
||||
m_OriginalInstanceId: -896
|
||||
m_LoadAssets: 0
|
||||
@@ -1,2 +1,2 @@
|
||||
m_EditorVersion: 6000.3.1f1
|
||||
m_EditorVersionWithRevision: 6000.3.1f1 (37142da19a94)
|
||||
m_EditorVersion: 6000.3.5f2
|
||||
m_EditorVersionWithRevision: 6000.3.5f2 (3fa8bc678cb0)
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"useBuildCacheServer": false,
|
||||
"cacheServerHost": "",
|
||||
"cacheServerPort": 8126,
|
||||
"threadedArchiving": true,
|
||||
"logCacheMiss": false,
|
||||
"logAssetWarnings": true,
|
||||
"slimWriteResults": true,
|
||||
"maximumCacheSize": 20,
|
||||
"useDetailedBuildLog": false,
|
||||
"useV2Hasher": true,
|
||||
"fileIDHashSeed": 0,
|
||||
"prefabPackedHeaderSize": 2
|
||||
}
|
||||
Reference in new issue
Block a user