Compare commits
77
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e654a0daf4 | ||
|
|
cfe5b39cc9 | ||
|
|
c14880457d | ||
|
|
344470978d | ||
|
|
dab970737a | ||
|
|
afdd523682 | ||
|
|
575e66425a | ||
|
|
c470f63409 | ||
|
|
5da64a7b3d | ||
|
|
c4ab11488b | ||
|
|
cb968d782b | ||
|
|
522f51be3f | ||
|
|
7024e1daf0 | ||
|
|
020934e07f | ||
|
|
d3fbd4c5c3 | ||
|
|
5b09068b0c | ||
|
|
ddb76a5b93 | ||
|
|
0f708ff4cb | ||
|
|
721d5ebf9c | ||
|
|
3bb99aaf1e | ||
|
|
a2acea39dc | ||
|
|
5c1fd1510d | ||
|
|
e128ee59f9 | ||
|
|
5c81bde5db | ||
|
|
05449642d5 | ||
|
|
3020140360 | ||
|
|
e67fea2051 | ||
|
|
d1aad440f5 | ||
|
|
0e1c274677 | ||
|
|
346dc97fef | ||
|
|
557c4c3dee | ||
|
|
dbabd847c1 | ||
|
|
874280741c | ||
|
|
b13cf8cfc0 | ||
|
|
177464cc09 | ||
|
|
f8448ba922 | ||
|
|
0f8a629e4b | ||
|
|
7bc15cc03d | ||
|
|
d861e06caf | ||
|
|
f940cbffe0 | ||
|
|
6b1f24b72e | ||
|
|
1ad87e7432 | ||
|
|
09219d9091 | ||
|
|
37f5d15410 | ||
|
|
019da8cfd3 | ||
|
|
edf3821c0d | ||
|
|
45fe19be24 | ||
|
|
bea109175b | ||
|
|
b214bb0f63 | ||
|
|
0ac5ba1e1c | ||
|
|
ab9d444072 | ||
|
|
2335908a90 | ||
|
|
ae76edb0d0 | ||
|
|
6f2b063700 | ||
|
|
0e188efe59 | ||
|
|
c6d1c3bffd | ||
|
|
07ce27618c | ||
|
|
fb85b22e96 | ||
|
|
665114b7dc | ||
|
|
4549617275 | ||
|
|
db541fed8a | ||
|
|
085429d5ca | ||
|
|
981d081bed | ||
|
|
6148889fc1 | ||
|
|
7538ce81af | ||
|
|
a198d7fc00 | ||
|
|
7114f1136c | ||
|
|
5bf468673f | ||
|
|
9a3743988d | ||
|
|
e6879076a3 | ||
|
|
487331dc10 | ||
|
|
bada54c828 | ||
|
|
ff095526bd | ||
|
|
ee7771acd9 | ||
|
|
bd0cee77a6 | ||
|
|
8981457f2d | ||
|
|
86c9c126a6 |
No files matched your search
Generated
+13
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/contentModel.xml
|
||||
/projectSettingsUpdater.xml
|
||||
/modules.xml
|
||||
/.idea.CourierOldRe.iml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
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
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65cf716f111fb36a19123f807ecdce25
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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:
|
||||
- 7e9d70e73e500eb9287683466ebf646f
|
||||
- d447fc60305c17a17bf20948ab295a45
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88c15d5f41d582974a9b7218c493e4a7
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,116 @@
|
||||
%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: 468a46d0ae32c3544b7d98094e6448a9, type: 3}
|
||||
m_Name: AddressableAssetSettings
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetSettings
|
||||
m_DefaultGroup: d447fc60305c17a17bf20948ab295a45
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: adba03da8c5086ecbcf5b8db72996dd1
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
m_DisableCatalogUpdateOnStart: 0
|
||||
m_InternalIdNamingMode: 0
|
||||
m_InternalBundleIdMode: 1
|
||||
m_AssetLoadMode: 0
|
||||
m_BundledAssetProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
|
||||
m_AssetBundleProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
|
||||
m_IgnoreUnsupportedFilesInBuild: 0
|
||||
m_UniqueBundleIds: 0
|
||||
m_EnableJsonCatalog: 0
|
||||
m_NonRecursiveBuilding: 1
|
||||
m_AllowNestedBundleFolders: 0
|
||||
m_CCDEnabled: 0
|
||||
m_maxConcurrentWebRequests: 3
|
||||
m_UseUWRForLocalBundles: 0
|
||||
m_BundleTimeout: 0
|
||||
m_BundleRetryCount: 0
|
||||
m_BundleRedirectLimit: -1
|
||||
m_SharedBundleSettings: 0
|
||||
m_SharedBundleSettingsCustomGroupIndex: 0
|
||||
m_ContiguousBundles: 1
|
||||
m_StripUnityVersionFromBundleBuild: 0
|
||||
m_DisableVisibleSubAssetRepresentations: 0
|
||||
m_BuiltInBundleNaming: 0
|
||||
mBuiltInBundleCustomNaming:
|
||||
m_MonoScriptBundleNaming: 0
|
||||
m_CheckForContentUpdateRestrictionsOption: 0
|
||||
m_MonoScriptBundleCustomNaming:
|
||||
m_RemoteCatalogBuildPath:
|
||||
m_Id:
|
||||
m_RemoteCatalogLoadPath:
|
||||
m_Id:
|
||||
m_ContentStateBuildPathProfileVariableName: <default settings path>
|
||||
m_CustomContentStateBuildPath:
|
||||
m_ContentStateBuildPath:
|
||||
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
|
||||
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
|
||||
m_ProfileSettings:
|
||||
m_Profiles:
|
||||
- m_InheritedParent:
|
||||
m_Id: 27da1d7d9f959ba49a362cf69a3fd39a
|
||||
m_ProfileName: Default
|
||||
m_Values:
|
||||
- m_Id: 1c16dd3f2d89b2375b66c8f065c7a694
|
||||
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
|
||||
- m_Id: 3dfc1a15d30236e7a8856b2164e14280
|
||||
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
|
||||
- m_Id: 6c794a757c731a0319b43709731ad88b
|
||||
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
|
||||
- m_Id: 74b04ebc3f202c2f9b6f1e8fb0470bd2
|
||||
m_Value: 'ServerData/[BuildTarget]'
|
||||
- m_Id: 9ccf5e6cc7ba2d421a1c573d8a7ebcd7
|
||||
m_Value: <undefined>
|
||||
m_ProfileEntryNames:
|
||||
- m_Id: 1c16dd3f2d89b2375b66c8f065c7a694
|
||||
m_Name: BuildTarget
|
||||
m_InlineUsage: 0
|
||||
- m_Id: 3dfc1a15d30236e7a8856b2164e14280
|
||||
m_Name: Local.BuildPath
|
||||
m_InlineUsage: 0
|
||||
- m_Id: 6c794a757c731a0319b43709731ad88b
|
||||
m_Name: Local.LoadPath
|
||||
m_InlineUsage: 0
|
||||
- m_Id: 74b04ebc3f202c2f9b6f1e8fb0470bd2
|
||||
m_Name: Remote.BuildPath
|
||||
m_InlineUsage: 0
|
||||
- m_Id: 9ccf5e6cc7ba2d421a1c573d8a7ebcd7
|
||||
m_Name: Remote.LoadPath
|
||||
m_InlineUsage: 0
|
||||
m_ProfileVersion: 1
|
||||
m_LabelTable:
|
||||
m_LabelNames:
|
||||
- default
|
||||
m_SchemaTemplates: []
|
||||
m_GroupTemplateObjects:
|
||||
- {fileID: 11400000, guid: 14909e654d6c7bd958ff44091773bd40, type: 2}
|
||||
m_InitializationObjects: []
|
||||
m_CertificateHandlerType:
|
||||
m_AssemblyName:
|
||||
m_ClassName:
|
||||
m_ActivePlayerDataBuilderIndex: 2
|
||||
m_DataBuilders:
|
||||
- {fileID: 11400000, guid: 1ac723026a19cb90d8d5dd77ce8c384b, type: 2}
|
||||
- {fileID: 11400000, guid: e628a9e942e45e1ca94ad90d02e9acdf, type: 2}
|
||||
- {fileID: 11400000, guid: 1d3143f4a67a990fc9532b22a020137d, type: 2}
|
||||
m_ActiveProfileId: 27da1d7d9f959ba49a362cf69a3fd39a
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2588e84eb64800d0781c574a37fa48d8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ac379942ee61a312a9830cb792d2871
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
%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: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3}
|
||||
m_Name: Packed Assets
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroupTemplate
|
||||
m_SchemaObjects:
|
||||
- {fileID: 8850813396489121111}
|
||||
- {fileID: 3451013361182384685}
|
||||
m_Description: Pack assets into asset bundles.
|
||||
m_Settings: {fileID: 11400000, guid: 2588e84eb64800d0781c574a37fa48d8, type: 2}
|
||||
--- !u!114 &3451013361182384685
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
|
||||
m_Name: ContentUpdateGroupSchema
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
|
||||
m_Group: {fileID: 0}
|
||||
m_StaticContent: 0
|
||||
--- !u!114 &8850813396489121111
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
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: e5d17a21594effb4e9591490b009e7aa, type: 3}
|
||||
m_Name: BundledAssetGroupSchema
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
|
||||
m_Group: {fileID: 0}
|
||||
m_InternalBundleIdMode: 1
|
||||
m_Compression: 1
|
||||
m_IncludeAddressInCatalog: 1
|
||||
m_IncludeGUIDInCatalog: 1
|
||||
m_IncludeLabelsInCatalog: 1
|
||||
m_InternalIdNamingMode: 0
|
||||
m_CacheClearBehavior: 0
|
||||
m_IncludeInBuild: 1
|
||||
m_BundledAssetProviderType:
|
||||
m_AssemblyName:
|
||||
m_ClassName:
|
||||
m_StripDownloadOptions: 0
|
||||
m_ForceUniqueProvider: 0
|
||||
m_UseAssetBundleCache: 1
|
||||
m_UseAssetBundleCrc: 1
|
||||
m_UseAssetBundleCrcForCachedBundles: 1
|
||||
m_UseUWRForLocalBundles: 0
|
||||
m_Timeout: 0
|
||||
m_ChunkedTransfer: 0
|
||||
m_RedirectLimit: -1
|
||||
m_RetryCount: 0
|
||||
m_BuildPath:
|
||||
m_Id:
|
||||
m_LoadPath:
|
||||
m_Id:
|
||||
m_BundleMode: 0
|
||||
m_AssetBundleProviderType:
|
||||
m_AssemblyName:
|
||||
m_ClassName:
|
||||
m_UseDefaultSchemaSettings: 0
|
||||
m_SelectedPathPairIndex: 0
|
||||
m_BundleNaming: 0
|
||||
m_AssetLoadMode: 0
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14909e654d6c7bd958ff44091773bd40
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a39981dbe6de5001397f5ca9a8a37e1a
|
||||
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: 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:
|
||||
@@ -0,0 +1,193 @@
|
||||
%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: Default Local Group
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroup
|
||||
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: 1f79c7b1e492a4ea2a8d666cdead0c52
|
||||
m_Address: Audio/Dispatcher/take_damage4
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2301400160a23924eb27c4bdbe797739
|
||||
m_Address: 'Audio/Music/Nightmargin (Oneshot OST) - The Prophecy '
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 23e11d2c8a4f12f4ea9a7a43d1118464
|
||||
m_Address: Gameplay
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 29bff8011973e4e519906b9da8fca0fc
|
||||
m_Address: Audio/Dispatcher/late3
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 29ee630aab7bbef8799dc76ed0c239f7
|
||||
m_Address: Audio/Dispatcher/late4
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2ed2d93a9f39d4edba511cb7396c7bb6
|
||||
m_Address: Prefabs/Enemies/Cockroach
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2f6134357dc2a5641a846a7478ce4c2c
|
||||
m_Address: bravo!
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 31f16c866d3224ab8a7e0fabf3745ec5
|
||||
m_Address: Audio/Dispatcher/late5
|
||||
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: 4bd64d1fcecc9c6b09d81e78b7dcfebe
|
||||
m_Address: Audio/Dispatcher/take_damage1
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 735f38402ea347fa381408293503a24e
|
||||
m_Address: Audio/Dispatcher/receiving_an_order1
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 7c5caf3ceee44f71588860c5c1fbdbe0
|
||||
m_Address: Audio/Dispatcher/take_damage3
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 803e40b883c823b89a91aa8b9d9fc483
|
||||
m_Address: valve_sound
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 81844a99f5b786b41b831174f8fb6d3a
|
||||
m_Address: Prefabs/Player/CharacterController
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 82c71411174bfa86ca1f676b9d389f94
|
||||
m_Address: bastard!
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8c2be26d359d54063825fedfad7a493b
|
||||
m_Address: Audio/Dispatcher/late2
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8fa89a492fc3a3768a0f0ba1bb7080e0
|
||||
m_Address: Audio/Dispatcher/late1
|
||||
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
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b33855c694de89386a25c56cbe463a0e
|
||||
m_Address: Prefabs/Enemies/DrunkenGrandpa
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c566fc932edefbbee9e53271eac3c560
|
||||
m_Address: MainMenu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: cab4b1ff78dd6b1fba61aa165aa17b4d
|
||||
m_Address: Audio/Dispatcher/receiving_an_order2
|
||||
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
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f3d7dc64b34919ad7b50a3dd307a935b
|
||||
m_Address: Prefabs/Enemies/Fog
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f4b6fa54ecac6cc418f98824491aa17a
|
||||
m_Address: Audio/Music/SANABI - JUSTICE Is Watching You
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f74a409bf11b25148ad305acc05b14f5
|
||||
m_Address: Audio/Dispatcher/take_damage2
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 2588e84eb64800d0781c574a37fa48d8, type: 2}
|
||||
m_SchemaSet:
|
||||
m_Schemas:
|
||||
- {fileID: 11400000, guid: 75ffac7db08d9615c994048949431551, type: 2}
|
||||
- {fileID: 11400000, guid: 6d6fed27b8c8a3eebb9bc5289b7a6956, type: 2}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c592a6445170e8379910601b962cb30
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25c8e3b4ddb778a6d84ae525564a7ee1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
%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: e5d17a21594effb4e9591490b009e7aa, type: 3}
|
||||
m_Name: Default Local Group_BundledAssetGroupSchema
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
|
||||
m_Group: {fileID: 11400000, guid: 7c592a6445170e8379910601b962cb30, type: 2}
|
||||
m_InternalBundleIdMode: 1
|
||||
m_Compression: 1
|
||||
m_IncludeAddressInCatalog: 1
|
||||
m_IncludeGUIDInCatalog: 1
|
||||
m_IncludeLabelsInCatalog: 1
|
||||
m_InternalIdNamingMode: 0
|
||||
m_CacheClearBehavior: 0
|
||||
m_IncludeInBuild: 1
|
||||
m_BundledAssetProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
|
||||
m_StripDownloadOptions: 0
|
||||
m_ForceUniqueProvider: 0
|
||||
m_UseAssetBundleCache: 1
|
||||
m_UseAssetBundleCrc: 1
|
||||
m_UseAssetBundleCrcForCachedBundles: 1
|
||||
m_UseUWRForLocalBundles: 0
|
||||
m_Timeout: 0
|
||||
m_ChunkedTransfer: 0
|
||||
m_RedirectLimit: -1
|
||||
m_RetryCount: 0
|
||||
m_BuildPath:
|
||||
m_Id: 3dfc1a15d30236e7a8856b2164e14280
|
||||
m_LoadPath:
|
||||
m_Id: 6c794a757c731a0319b43709731ad88b
|
||||
m_BundleMode: 0
|
||||
m_AssetBundleProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
|
||||
m_UseDefaultSchemaSettings: 0
|
||||
m_SelectedPathPairIndex: 0
|
||||
m_BundleNaming: 0
|
||||
m_AssetLoadMode: 0
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75ffac7db08d9615c994048949431551
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+16
@@ -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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
|
||||
m_Name: Default Local Group_ContentUpdateGroupSchema
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
|
||||
m_Group: {fileID: 11400000, guid: 7c592a6445170e8379910601b962cb30, type: 2}
|
||||
m_StaticContent: 0
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d6fed27b8c8a3eebb9bc5289b7a6956
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d870ba11c395ba2d6b17a441e8e68cef
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
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: 88d21199f5d473f4db36845f2318f180, type: 3}
|
||||
m_Name: BuildScriptFastMode
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptFastMode
|
||||
instanceProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
|
||||
sceneProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ac723026a19cb90d8d5dd77ce8c384b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
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: 3e2e0ffa088c91d41a086d0b8cb16bdc, type: 3}
|
||||
m_Name: BuildScriptPackedMode
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode
|
||||
instanceProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
|
||||
sceneProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d3143f4a67a990fc9532b22a020137d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+20
@@ -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: ad8c280d42ee0ed41a27db23b43dd2bf, type: 3}
|
||||
m_Name: BuildScriptPackedPlayMode
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedPlayMode
|
||||
instanceProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
|
||||
sceneProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e628a9e942e45e1ca94ad90d02e9acdf
|
||||
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: 3a189bb168d8d90478a09ea08c2f3d72, type: 3}
|
||||
m_Name: DefaultObject
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.AddressableAssetSettingsDefaultObject
|
||||
m_AddressableAssetSettingsGuid: 2588e84eb64800d0781c574a37fa48d8
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9338e51d1f2239ddbb8f2c6232a2b678
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
%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: 7e3976da977cb49238499ea3b4c237ae, type: 3}
|
||||
m_Name: ProfileDataSourceSettings
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.ProfileDataSourceSettings
|
||||
profileGroupTypes:
|
||||
- m_GroupTypePrefix: Built-In
|
||||
m_Variables:
|
||||
- m_Suffix: BuildPath
|
||||
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
|
||||
- m_Suffix: LoadPath
|
||||
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
|
||||
environments: []
|
||||
currentEnvironment:
|
||||
id:
|
||||
projectId:
|
||||
projectGenesisId:
|
||||
name:
|
||||
isDefault: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e2b0e48c9649284a9541c4d1dad59c2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.StateMachine;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
public class BootstrapState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
public BootstrapState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0183e73a08c64332babded3df3d06b95
|
||||
timeCreated: 1762122962
|
||||
@@ -1,5 +1,8 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Scenes;
|
||||
using Code.StateMachine;
|
||||
using Code.UI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
@@ -8,16 +11,31 @@ namespace Code.App.AppStates
|
||||
public GameOverState(AppStateMachineContext context) : base(context)
|
||||
{ }
|
||||
|
||||
private float damnTimer = 3f; // TODO Удалить при первой возможности
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
Context.UIService.SwitchPanelTo(UIPanel.GameOver);
|
||||
|
||||
base.EnterState();
|
||||
}
|
||||
|
||||
public override void Tick()
|
||||
{ }
|
||||
private void ToMainMenu()
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppState.MainMenu)
|
||||
.AllowStateTransition(AppState.Gameplay);
|
||||
}
|
||||
|
||||
public override void Tick()
|
||||
{
|
||||
damnTimer -= Time.deltaTime;
|
||||
if (damnTimer <= float.Epsilon) ToMainMenu();
|
||||
}
|
||||
public override void ExitState()
|
||||
{
|
||||
damnTimer = 5f;
|
||||
|
||||
Context.UIService.LoadingScreen.Show();
|
||||
base.ExitState();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,160 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Camera.CameraStates;
|
||||
using Code.Gameplay.Character.Core;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.Scenes.SceneEnvironments;
|
||||
using Code.StateMachine;
|
||||
using Code.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Extensions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
public class GameplayState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
// DEBUG
|
||||
private Transform _testSFXTransform;
|
||||
// DEBUG
|
||||
|
||||
private PlayerHealth _playerHealth;
|
||||
private PlayerMoney _playerMoney;
|
||||
|
||||
private CharacterProvider _playerCharacter;
|
||||
|
||||
public GameplayState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
Context.SceneLoaderService.LoadScene((int)SceneIds.Gameplay, SceneLoaded);
|
||||
Context.UIService.LoadingScreen.Show();
|
||||
|
||||
_playerMoney = Context.PlayerFactory.CreatePlayerMoney();
|
||||
|
||||
//_playerHealth = Context.PlayerProvider.Health;
|
||||
//_playerHealth.OnDeath += EndGame;
|
||||
|
||||
Context.AudioService.TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||
|
||||
Context.InputService.EnableMap(ActionMappings.Gameplay);
|
||||
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug1, GiveHealth);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug3, GiveMoney);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug2, LooseHealth);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug4, LooseMoney);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug5, PlayDebugSFX);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug6, PlayDebugDispatcher);
|
||||
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
WaitForSceneToLoad();
|
||||
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
}
|
||||
|
||||
private void SceneLoaded()
|
||||
private async UniTask WaitForPlayerCharacterLoad() => _playerCharacter = await Context.PlayerFactory.CreatePlayer();
|
||||
|
||||
private async UniTaskVoid WaitForSceneToLoad()
|
||||
{
|
||||
await UniTask.WhenAll(
|
||||
Context.SceneLoaderService.LoadSceneAsyncAwaitable((int)SceneIds.Gameplay),
|
||||
Context.UIService.AsyncSwitchPanelTo(UIPanel.Gameplay),
|
||||
Context.AudioFactory.WarmGameplayMusic(),
|
||||
Context.AudioFactory.WarmSFX(),
|
||||
WaitForPlayerCharacterLoad()
|
||||
);
|
||||
|
||||
base.EnterState();
|
||||
_playerHealth = Context.PlayerProvider.Health;
|
||||
_playerHealth.OnDeath += EndGame;
|
||||
|
||||
Context.AudioService.PlayRandomMusicUntilHumanityWillBeDestroyedForTheySins(MusicType.Peaceful);
|
||||
Context.AudioService.PlayRandomMusicUntilHumanityWillBeDestroyedForTheySins(MusicType.Action);
|
||||
|
||||
var sceneEnvironment = ((GameplaySceneEnvironment)SceneManager.GetActiveScene()
|
||||
.GetSceneContainer().Resolve<CurrentSceneEnvironment>());
|
||||
|
||||
_testSFXTransform = sceneEnvironment.debugSfxTarget;
|
||||
|
||||
_playerCharacter.Teleport(sceneEnvironment.playerSpawnPoint.position, sceneEnvironment.playerSpawnPoint.rotation);
|
||||
|
||||
((GameplayPanel)Context.UIService.CurrentPanel).Initialize(_playerMoney, _playerHealth);
|
||||
|
||||
Context.CameraStateMachine.SwitchState(CameraMode.FirstPerson);
|
||||
|
||||
((BaseCameraState)Context.CameraStateMachine.CurrentBaseState).SetFollowTransform(_playerCharacter.GetFollowTransform());
|
||||
|
||||
Context.InputService.EnableMap(ActionMappings.Gameplay);
|
||||
|
||||
Context.UIService.LoadingScreen.Hide();
|
||||
}
|
||||
|
||||
private void OnCharacterSpawn(CharacterProvider characterProvider)
|
||||
{
|
||||
((BaseCameraState)Context.CameraStateMachine.CurrentBaseState).SetFollowTransform(_playerCharacter.GetFollowTransform());
|
||||
}
|
||||
private void PlayDebugSFX(InputAction.CallbackContext context)
|
||||
{
|
||||
Context.AudioService.PlaySFX(SFXSounds.Crowbar, _testSFXTransform.position);
|
||||
}
|
||||
private void PlayDebugDispatcher(InputAction.CallbackContext context)
|
||||
{
|
||||
Context.AudioService.PlayDispatcher(DispatcherSounds.AhFreeman);
|
||||
}
|
||||
private void GiveHealth(InputAction.CallbackContext context)
|
||||
{
|
||||
_playerHealth.GetDamage(-1);
|
||||
}
|
||||
|
||||
private void LooseHealth(InputAction.CallbackContext context)
|
||||
{
|
||||
_playerHealth.GetDamage(1);
|
||||
}
|
||||
|
||||
private void GiveMoney(InputAction.CallbackContext context)
|
||||
{
|
||||
_playerMoney.GiveMoney(100);
|
||||
((GameplayPanel)(Context.UIService.CurrentPanel)).SummonDispatcher();
|
||||
}
|
||||
|
||||
private void LooseMoney(InputAction.CallbackContext context)
|
||||
{
|
||||
_playerMoney.LooseMoney(100);
|
||||
((GameplayPanel)(Context.UIService.CurrentPanel)).CloseDispatcher();
|
||||
}
|
||||
// DEBUG
|
||||
public override void Tick()
|
||||
{
|
||||
}
|
||||
|
||||
private void EndGame()
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppState.GameOver)
|
||||
.AllowStateTransition(AppState.MainMenu);
|
||||
}
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
_playerHealth = null;
|
||||
_playerMoney = null;
|
||||
|
||||
Context.PlayerFactory.ReleasePlayer(_playerCharacter);
|
||||
_playerCharacter = null;
|
||||
|
||||
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
||||
Context.AudioService.GladlyAskToStopMusic(MusicType.Action, callback: Context.AudioFactory.ReleaseActionMusic);
|
||||
Context.AudioService.GladlyAskToStopMusic(MusicType.Peaceful, callback: Context.AudioFactory.ReleasePeacefulMusic);
|
||||
|
||||
Context.InputService.DebugUnbindAction((int)ActionMappings.Debug, (int)DebugActions.Debug1, GiveHealth);
|
||||
Context.InputService.DebugUnbindAction((int)ActionMappings.Debug, (int)DebugActions.Debug3, GiveHealth);
|
||||
Context.InputService.DebugUnbindAction((int)ActionMappings.Debug, (int)DebugActions.Debug2, LooseHealth);
|
||||
Context.InputService.DebugUnbindAction((int)ActionMappings.Debug, (int)DebugActions.Debug4, LooseMoney);
|
||||
Context.InputService.DebugUnbindAction((int)ActionMappings.Debug, (int)DebugActions.Debug5, PlayDebugSFX);
|
||||
Context.InputService.DebugUnbindAction((int)ActionMappings.Debug, (int)DebugActions.Debug6, PlayDebugDispatcher);
|
||||
|
||||
base.ExitState();
|
||||
}
|
||||
|
||||
@@ -1,33 +1,88 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Camera.CameraStates;
|
||||
using Code.Gameplay.Door;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.Scenes.SceneEnvironments;
|
||||
using Code.StateMachine;
|
||||
using Code.UI;
|
||||
using Code.UI.Panels;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Extensions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
public class MainMenuState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
public MainMenuState(AppStateMachineContext context) : base(context)
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
Context.SceneLoaderService.LoadScene((int)SceneIds.MainMenu, SceneLoaded);
|
||||
Context.UIService.LoadingScreen.Show();
|
||||
|
||||
Context.CameraStateMachine.SwitchState(CameraMode.UltraStatic);
|
||||
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
WaitForSceneToLoad();
|
||||
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
}
|
||||
|
||||
private CinematicDoorOpening _damnDoor = new();
|
||||
private async UniTaskVoid WaitForSceneToLoad()
|
||||
{
|
||||
await UniTask.WhenAll(
|
||||
Context.SceneLoaderService.LoadSceneAsyncAwaitable((int)SceneIds.MainMenu),
|
||||
Context.UIService.AsyncSwitchPanelTo(UIPanel.MainMenu),
|
||||
Context.AudioFactory.WarmMenuMusic()
|
||||
);
|
||||
|
||||
Context.AudioService.TransitToSnapshot(AudioSnapshotState.Menu);
|
||||
Context.AudioService.PlayRandomMusicUntilHumanityWillBeDestroyedForTheySins(MusicType.Menu);
|
||||
|
||||
var hui = ((MainMenuEnvironment)SceneManager.GetActiveScene()
|
||||
.GetSceneContainer().Resolve<CurrentSceneEnvironment>());
|
||||
_damnDoor.DamnDoor = hui.damnDoor;
|
||||
_damnDoor.DamnDoor.SetPhysics(false);
|
||||
_damnDoor.DoorLight = hui.doorLight;
|
||||
|
||||
var menuPanel = (MainMenuPanel)Context.UIService.CurrentPanel;
|
||||
|
||||
menuPanel.startButton.button.onClick.AddListener(StartGame);
|
||||
menuPanel.exitButton.button.onClick.AddListener(ExitGame);
|
||||
menuPanel.CinematicDoorOpening = _damnDoor;
|
||||
|
||||
((UltraStaticState)Context.CameraStateMachine.CurrentBaseState).SetFollowTransform(hui.cameraPosition);
|
||||
|
||||
Context.UIService.LoadingScreen.Hide();
|
||||
|
||||
Context.InputService.EnableMap(ActionMappings.MainMenu);
|
||||
}
|
||||
|
||||
private void SceneLoaded()
|
||||
{
|
||||
|
||||
|
||||
base.EnterState();
|
||||
}
|
||||
public override void Tick()
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
private void StartGame()
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppState.Gameplay)
|
||||
.AllowStateTransition(AppState.GameOver);
|
||||
}
|
||||
|
||||
private void ExitGame()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
Context.InputService.DisableMap(ActionMappings.MainMenu);
|
||||
Context.AudioService.GladlyAskToStopMusic(MusicType.Menu, callback: Context.AudioFactory.ReleaseMenuMusic);
|
||||
|
||||
base.ExitState();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.StateMachine;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
//TODO: поменяно для теста
|
||||
public class MovementDevState: BaseState<AppStateMachineContext>
|
||||
{
|
||||
public MovementDevState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
// Context.SceneLoaderService.LoadScene((int)SceneIds.MovementDev, SceneLoaded);
|
||||
Context.InputService.EnableMap(ActionMappings.Gameplay);
|
||||
|
||||
Context.CameraStateMachine.SwitchState(CameraMode.FirstPerson);
|
||||
}
|
||||
|
||||
private void SceneLoaded()
|
||||
{
|
||||
|
||||
base.EnterState();
|
||||
}
|
||||
|
||||
public override void Tick()
|
||||
{
|
||||
}
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
||||
|
||||
base.ExitState();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 395d8d3979124f10897c28bae62b288a
|
||||
timeCreated: 1760638654
|
||||
@@ -1,8 +1,15 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Configs;
|
||||
using Code.Constants;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.StaticData;
|
||||
using Code.UI;
|
||||
using Code.UI.Panels;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Core;
|
||||
using Reflex.Injectors;
|
||||
using UnityEngine;
|
||||
@@ -12,7 +19,6 @@ namespace Code.App
|
||||
{
|
||||
public class BootstrapInstaller : MonoBehaviour, IInstaller
|
||||
{
|
||||
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
InstallStaticData(containerBuilder, out IStaticDataService staticDataService);
|
||||
@@ -20,20 +26,39 @@ namespace Code.App
|
||||
InstallInfrastructureUnit(containerBuilder, staticDataService);
|
||||
|
||||
containerBuilder.AddSingleton(typeof(InputService), typeof(IInputService));
|
||||
containerBuilder.AddSingleton(typeof(PlayerFactory), typeof(IPlayerFactory));
|
||||
containerBuilder.AddSingleton(typeof(PlayerProvider), typeof(IPlayerProvider));
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private void InitializeCamera(ContainerBuilder containerBuilder, IStaticDataService staticDataService)
|
||||
{
|
||||
Camera camera = Instantiate(staticDataService.CameraConfig.cameraPrefab);
|
||||
|
||||
DontDestroyOnLoad(camera);
|
||||
containerBuilder.AddSingleton(camera);
|
||||
}
|
||||
|
||||
private void InstallInfrastructureUnit(ContainerBuilder containerBuilder, IStaticDataService staticDataService)
|
||||
{
|
||||
GameObject infrastructureUnit = Instantiate(staticDataService.AppConfig.infrastructureUnitPrefab);
|
||||
DontDestroyOnLoad(infrastructureUnit);
|
||||
|
||||
containerBuilder.AddSingleton(infrastructureUnit);
|
||||
containerBuilder.AddSingleton(infrastructureUnit.GetComponent<ICoroutineRunner>(),
|
||||
containerBuilder.AddSingleton(infrastructureUnit.AddComponent<CoroutineRunner>(),
|
||||
typeof(ICoroutineRunner));
|
||||
containerBuilder.AddSingleton(infrastructureUnit.AddComponent<AppStateMachine>());
|
||||
containerBuilder.AddSingleton(infrastructureUnit.AddComponent<CameraStateMachine>());
|
||||
}
|
||||
|
||||
private void InstallStaticData(ContainerBuilder containerBuilder, out IStaticDataService staticDataService)
|
||||
@@ -42,17 +67,56 @@ namespace Code.App
|
||||
staticDataService.Load();
|
||||
|
||||
containerBuilder.AddSingleton(staticDataService, typeof(IStaticDataService));
|
||||
|
||||
containerBuilder.AddSingleton(staticDataService.InputConfig.inputActionAsset, typeof(InputActionAsset));
|
||||
containerBuilder.AddSingleton(staticDataService.InputConfig, typeof(InputConfig));
|
||||
|
||||
containerBuilder.AddSingleton(staticDataService.CameraConfig, typeof(CameraConfig));
|
||||
|
||||
containerBuilder.AddSingleton(staticDataService.PlayerConfig, typeof(PlayerConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.CharacterConfig, typeof(CharacterConfig));
|
||||
|
||||
containerBuilder.AddSingleton(staticDataService.UIConfig, typeof(UIConfig));
|
||||
|
||||
containerBuilder.AddSingleton(staticDataService.DrunkenGrandpaConfig, typeof(DrunkenGrandpaConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.CockroachConfig, typeof(CockroachConfig));
|
||||
containerBuilder.AddSingleton(staticDataService.FogConfig, typeof(FogConfig));
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
private AppStateMachine _appStateMachine;
|
||||
|
||||
private void Bootstrap(Container container)
|
||||
{
|
||||
AppStateMachine appStateMachine = container.Resolve<AppStateMachine>();
|
||||
appStateMachine.Initialize();
|
||||
_appStateMachine = container.Resolve<AppStateMachine>();
|
||||
_appStateMachine.Initialize();
|
||||
AttributeInjector.Inject(_appStateMachine.StateMachineContext, container);
|
||||
|
||||
AttributeInjector.Inject(appStateMachine.StateMachineContext, container);
|
||||
CameraStateMachine cameraStateMachine = container.Resolve<CameraStateMachine>();
|
||||
AttributeInjector.Inject(cameraStateMachine.StateMachineContext, container);
|
||||
cameraStateMachine.Initialize();
|
||||
|
||||
appStateMachine
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
BootstrapFinish(container);
|
||||
|
||||
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
}
|
||||
private async UniTaskVoid BootstrapFinish(Container container)
|
||||
{
|
||||
var loadingScreen = GameObject.FindWithTag(Tags.LoadingScreen);
|
||||
DontDestroyOnLoad(loadingScreen);
|
||||
|
||||
await UniTask.WhenAll(
|
||||
container.Resolve<IUIService>().Initialize(loadingScreen.GetComponent<LoadingScreen>()),
|
||||
container.Resolve<IAudioService>().Initialize()
|
||||
);
|
||||
|
||||
_appStateMachine
|
||||
.SwitchState(AppState.MainMenu)
|
||||
.AllowStateTransition(AppState.Gameplay);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7a271c6319540abb78d561f392e1396
|
||||
timeCreated: 1761743570
|
||||
@@ -0,0 +1,26 @@
|
||||
using Code.Scenes;
|
||||
using Code.Scenes.SceneEnvironments;
|
||||
using Reflex.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.App.SceneInstallers
|
||||
{
|
||||
public class GameplaySceneInstaller : MonoBehaviour, IInstaller
|
||||
{
|
||||
[SerializeField] private GameplaySceneEnvironment _gameplaySceneEnvironment;
|
||||
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
containerBuilder.AddScoped(typeof(GameplaySceneEnvironment), typeof(CurrentSceneEnvironment));
|
||||
|
||||
containerBuilder.OnContainerBuilt += Initialize;
|
||||
}
|
||||
|
||||
private void Initialize(Container container)
|
||||
{
|
||||
GameplaySceneEnvironment env = (GameplaySceneEnvironment)container.Resolve<CurrentSceneEnvironment>();
|
||||
|
||||
env.TransitVariables(_gameplaySceneEnvironment);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88584fd4361b46f6a7326440cd95ce69
|
||||
timeCreated: 1763144580
|
||||
@@ -0,0 +1,27 @@
|
||||
using Code.Scenes;
|
||||
using Code.Scenes.SceneEnvironments;
|
||||
using Reflex.Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Code.App.SceneInstallers
|
||||
{
|
||||
public class MainMenuSceneInstaller : MonoBehaviour, IInstaller
|
||||
{
|
||||
[SerializeField] private MainMenuEnvironment _mainMenuEnvironment;
|
||||
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
containerBuilder.AddScoped(typeof(MainMenuEnvironment), typeof(CurrentSceneEnvironment));
|
||||
|
||||
containerBuilder.OnContainerBuilt += Initialize;
|
||||
}
|
||||
|
||||
private void Initialize(Container container)
|
||||
{
|
||||
MainMenuEnvironment env = (MainMenuEnvironment)container.Resolve<CurrentSceneEnvironment>();
|
||||
|
||||
env.TransitVariables(_mainMenuEnvironment);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04145a046c584b66818ca25745652e66
|
||||
timeCreated: 1761743587
|
||||
@@ -8,6 +8,8 @@ namespace Code.App.StateMachine
|
||||
Bootstrap = 1,
|
||||
MainMenu = 2,
|
||||
Gameplay = 4,
|
||||
GameOver = 8
|
||||
GameOver = 8,
|
||||
// TODO: поменяно для теста
|
||||
MovementDev = 52
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,18 @@ namespace Code.App.StateMachine
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
States.Add(AppState.Bootstrap, new BootstrapState(StateMachineContext));
|
||||
States.Add(AppState.MainMenu, new MainMenuState(StateMachineContext));
|
||||
States.Add(AppState.Gameplay, new GameplayState(StateMachineContext));
|
||||
States.Add(AppState.GameOver, new GameOverState(StateMachineContext));
|
||||
//TODO: Для теста
|
||||
States.Add(AppState.MovementDev, new MovementDevState(StateMachineContext));
|
||||
|
||||
AllowedStates |= AppState.MainMenu;
|
||||
AllowedStates |= AppState.Gameplay;
|
||||
AllowedStates |= AppState.MovementDev;
|
||||
|
||||
CurrentBaseState = States[AppState.Bootstrap];
|
||||
}
|
||||
|
||||
protected override bool CheckTransitionAllowed(AppState nextState) => AllowedStates.HasFlag(nextState);
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.UI;
|
||||
using Reflex.Attributes;
|
||||
|
||||
namespace Code.App.StateMachine
|
||||
{
|
||||
public class AppStateMachineContext
|
||||
{
|
||||
[Inject] public ISceneLoaderService SceneLoaderService;
|
||||
[Inject] public IInputService InputService;
|
||||
[Inject] public ISceneLoaderService SceneLoaderService { get; private set; }
|
||||
[Inject] public IInputService InputService { get; private set; }
|
||||
[Inject] public AppStateMachine StateMachine { get; private set; }
|
||||
[Inject] public CameraStateMachine CameraStateMachine { get; private set; }
|
||||
[Inject] public IUIService UIService { get; private set; }
|
||||
[Inject] public IPlayerFactory PlayerFactory { get; private set; }
|
||||
[Inject] public IPlayerProvider PlayerProvider { get; private set; }
|
||||
[Inject] public IAudioFactory AudioFactory { get; private set; }
|
||||
[Inject] public IAudioService AudioService { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1937581573e47844bb593bd62310b89
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace Code.Audio
|
||||
{
|
||||
public enum SFXSounds
|
||||
{
|
||||
Crowbar,
|
||||
Shot357
|
||||
}
|
||||
public enum UISounds
|
||||
{
|
||||
Crowbar
|
||||
}
|
||||
public enum EnemiesSounds
|
||||
{
|
||||
Bastard,
|
||||
Bravo
|
||||
}
|
||||
public enum DispatcherSounds
|
||||
{
|
||||
Absolutely,
|
||||
AbsolutelyNot,
|
||||
AhFreeman
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 907b506ceac843ebb509a8e5298af540
|
||||
timeCreated: 1762888870
|
||||
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Code.Configs;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Code.Audio
|
||||
{
|
||||
public class AudioFactory : IAudioFactory
|
||||
{
|
||||
public AudioMixer AudioMixer { get; private set; }
|
||||
private AssetReference _audioSourcePrefab;
|
||||
|
||||
private AssetReference[] _peacefulSoundtrack;
|
||||
private AssetReference[] _actionSoundtrack;
|
||||
private AssetReference[] _menuSoundtrack;
|
||||
private AssetReference[] _SFX;
|
||||
private AssetReference[] _enemies;
|
||||
private AssetReference[] _dispatcher;
|
||||
private AssetReference[] _character;
|
||||
|
||||
private AsyncOperationHandle<IList<AudioClip>> _menuMusicHandle;
|
||||
private AsyncOperationHandle<IList<AudioClip>> _actionMusicHandle;
|
||||
private AsyncOperationHandle<IList<AudioClip>> _peacefulMusicHandle;
|
||||
private AsyncOperationHandle<IList<AudioClip>> _SFXHandle;
|
||||
private AsyncOperationHandle<IList<AudioClip>> _enemiesHandle;
|
||||
private AsyncOperationHandle<IList<AudioClip>> _dispatcherHandle;
|
||||
|
||||
public Dictionary<MusicType, List<AudioClip>> MusicDictionary { 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
|
||||
)
|
||||
{
|
||||
AudioMixer = audioMixerConfig.audioMixerAsset;
|
||||
_audioSourcePrefab = audioMixerConfig.audioSourcePrefab;
|
||||
|
||||
_peacefulSoundtrack = soundtrackListConfig.peacefulSoundtrack;
|
||||
_actionSoundtrack = soundtrackListConfig.actionSoundtrack;
|
||||
_menuSoundtrack = soundtrackListConfig.menuSoundtrack;
|
||||
_SFX = sfxListConfig.SFX;
|
||||
_enemies = enemiesSoundListConfig.enemies;
|
||||
_dispatcher = dispatcherSoundListConfig.dispatcher;
|
||||
|
||||
MusicDictionary.Add(MusicType.Menu, new ());
|
||||
MusicDictionary.Add(MusicType.Peaceful, new ());
|
||||
MusicDictionary.Add(MusicType.Action, new ());
|
||||
}
|
||||
|
||||
public async UniTask LoadAudioSourcePrefab(Action<GameObject> callback) =>
|
||||
callback?.Invoke(await Addressables.LoadAssetAsync<GameObject>(_audioSourcePrefab));
|
||||
|
||||
public async UniTask WarmGameplayMusic( )
|
||||
{
|
||||
_actionMusicHandle = Addressables.LoadAssetsAsync<AudioClip>(_actionSoundtrack, OnActionTrackLoaded, Addressables.MergeMode.None);
|
||||
_peacefulMusicHandle = Addressables.LoadAssetsAsync<AudioClip>(_peacefulSoundtrack, OnPeacefulTrackLoaded, Addressables.MergeMode.None);
|
||||
|
||||
await UniTask.WhenAll(_actionMusicHandle.ToUniTask(), _peacefulMusicHandle.ToUniTask());
|
||||
}
|
||||
public void ReleaseActionMusic()
|
||||
{
|
||||
MusicDictionary[MusicType.Action].Clear();
|
||||
_actionMusicHandle.Release();
|
||||
}
|
||||
public void ReleasePeacefulMusic()
|
||||
{
|
||||
MusicDictionary[MusicType.Peaceful].Clear();
|
||||
_peacefulMusicHandle.Release();
|
||||
}
|
||||
public async UniTask WarmMenuMusic( )
|
||||
{
|
||||
_menuMusicHandle = Addressables.LoadAssetsAsync<AudioClip>(_menuSoundtrack, OnMenuTrackLoaded, Addressables.MergeMode.None);
|
||||
// foreach (var assetReference in _menuSoundtrack) MenuMusic.Add(await assetReference.LoadAssetAsync<AudioClip>());
|
||||
await _menuMusicHandle.ToUniTask();
|
||||
|
||||
}
|
||||
public void ReleaseMenuMusic()
|
||||
{
|
||||
MusicDictionary[MusicType.Menu].Clear();
|
||||
// foreach (var assetReference in _menuSoundtrack) assetReference.ReleaseAsset();
|
||||
_menuMusicHandle.Release();
|
||||
}
|
||||
public async UniTask WarmSFX( )
|
||||
{
|
||||
_SFXHandle = Addressables.LoadAssetsAsync<AudioClip>(_SFX, OnSFXLoaded, Addressables.MergeMode.None);
|
||||
|
||||
await _SFXHandle.ToUniTask();
|
||||
|
||||
}
|
||||
public void ReleaseSFX()
|
||||
{
|
||||
SFXAudios.Clear();
|
||||
_SFXHandle.Release();
|
||||
}
|
||||
public async UniTask WarmEnemies( )
|
||||
{
|
||||
_enemiesHandle = Addressables.LoadAssetsAsync<AudioClip>(_enemies, OnEnemiesLoaded, Addressables.MergeMode.None);
|
||||
|
||||
await _enemiesHandle.ToUniTask();
|
||||
|
||||
}
|
||||
|
||||
public void ReleaseEnemies()
|
||||
{
|
||||
EnemiesAudios.Clear();
|
||||
_enemiesHandle.Release();
|
||||
}
|
||||
|
||||
public async UniTask WarmDispatcher( )
|
||||
{
|
||||
_dispatcherHandle = Addressables.LoadAssetsAsync<AudioClip>(_dispatcher, OnDispatcherLoaded, Addressables.MergeMode.None);
|
||||
|
||||
await _dispatcherHandle.ToUniTask();
|
||||
|
||||
}
|
||||
|
||||
public void ReleaseDispatcher()
|
||||
{
|
||||
DispatcherAudios.Clear();
|
||||
_dispatcherHandle.Release();
|
||||
}
|
||||
|
||||
private void OnMenuTrackLoaded(AudioClip audioClip)
|
||||
{
|
||||
MusicDictionary[MusicType.Menu].Add(audioClip);
|
||||
}
|
||||
private void OnActionTrackLoaded(AudioClip audioClip)
|
||||
{
|
||||
MusicDictionary[MusicType.Action].Add(audioClip);
|
||||
}
|
||||
private void OnPeacefulTrackLoaded(AudioClip audioClip)
|
||||
{
|
||||
MusicDictionary[MusicType.Peaceful].Add(audioClip);
|
||||
}
|
||||
private void OnSFXLoaded(AudioClip audioClip)
|
||||
{
|
||||
SFXAudios.Add(audioClip);
|
||||
}
|
||||
private void OnEnemiesLoaded(AudioClip audioClip)
|
||||
{
|
||||
EnemiesAudios.Add(audioClip);
|
||||
}
|
||||
private void OnDispatcherLoaded(AudioClip audioClip)
|
||||
{
|
||||
DispatcherAudios.Add(audioClip);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a4b48740d194d4dafa1732f96d71687
|
||||
timeCreated: 1762626915
|
||||
@@ -0,0 +1,172 @@
|
||||
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;
|
||||
using UnityEngine.Audio;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Code.Audio
|
||||
{
|
||||
public class AudioService : IAudioService
|
||||
{
|
||||
private IAudioFactory _audioFactory;
|
||||
|
||||
private AudioMixer _mixer;
|
||||
private AudioSource _actionMusicSource;
|
||||
private AudioSource _peacefulMusicSource;
|
||||
|
||||
private AudioMixerGroup _masterGroup,
|
||||
// _musicGroup,
|
||||
// _actionMusicGroup,
|
||||
// _peacefulMusicGroup,
|
||||
_SFXGroup,
|
||||
_creaturesGroup,
|
||||
_dispatcherGroup,
|
||||
_courierGroup,
|
||||
_enemiesGroup;
|
||||
|
||||
private readonly AudioSourcePool _audioSourcePool = new();
|
||||
|
||||
private Dictionary<AudioSnapshotState, AudioMixerSnapshot> _snapshots = new();
|
||||
|
||||
public AudioService(IAudioFactory audioFactory)
|
||||
{
|
||||
_audioFactory = audioFactory;
|
||||
}
|
||||
|
||||
public async UniTask Initialize()
|
||||
{
|
||||
// _mixer = await _audioFactory.CreateMixer();
|
||||
_mixer = _audioFactory.AudioMixer;
|
||||
|
||||
_masterGroup = _mixer.FindMatchingGroups(AudioGroups.MasterGroup)[0];
|
||||
// _actionMusicGroup = _mixer.FindMatchingGroups(AudioGroups.ActionMusicGroup)[0];
|
||||
// _peacefulMusicGroup = _mixer.FindMatchingGroups(AudioGroups.PeacefulMusoup)[0];
|
||||
// _musicGroup = _mixer.FindMatchingGroups(AudioGroups.MusicGroup)[0];
|
||||
_musicAudioGroups.Add(MusicType.Menu, _mixer.FindMatchingGroups(AudioGroups.MenuMusicGroup)[0]);
|
||||
_musicAudioGroups.Add(MusicType.Action, _mixer.FindMatchingGroups(AudioGroups.ActionMusicGroup)[0]);
|
||||
_musicAudioGroups.Add(MusicType.Peaceful, _mixer.FindMatchingGroups(AudioGroups.PeacefulMusicGroup)[0]);
|
||||
|
||||
_cancellationTokenSources.Add(MusicType.Menu, new());
|
||||
_cancellationTokenSources.Add(MusicType.Action, new());
|
||||
_cancellationTokenSources.Add(MusicType.Peaceful, new());
|
||||
|
||||
_musicAudioSources.Add(MusicType.Menu, null);
|
||||
_musicAudioSources.Add(MusicType.Action, null);
|
||||
_musicAudioSources.Add(MusicType.Peaceful, null);
|
||||
|
||||
_SFXGroup = _mixer.FindMatchingGroups(AudioGroups.SFXGroup)[0];
|
||||
_creaturesGroup = _mixer.FindMatchingGroups(AudioGroups.CreaturesGroup)[0];
|
||||
_dispatcherGroup = _mixer.FindMatchingGroups(AudioGroups.DispatcherMusicGroup)[0];
|
||||
_courierGroup = _mixer.FindMatchingGroups(AudioGroups.CourierMusicGroup)[0];
|
||||
_enemiesGroup = _mixer.FindMatchingGroups(AudioGroups.EnemiesMusicGroup)[0];
|
||||
|
||||
_snapshots[AudioSnapshotState.None] = _mixer.FindSnapshot(AudioGroups.NoneSnapshot);
|
||||
_snapshots[AudioSnapshotState.Peaceful] = _mixer.FindSnapshot(AudioGroups.PeacefulSnapshot);
|
||||
_snapshots[AudioSnapshotState.Action] = _mixer.FindSnapshot(AudioGroups.ActionSnapshot);
|
||||
_snapshots[AudioSnapshotState.Menu] = _mixer.FindSnapshot(AudioGroups.MenuSnapshot);
|
||||
|
||||
await _audioFactory.LoadAudioSourcePrefab(_audioSourcePool.Initialize);
|
||||
|
||||
}
|
||||
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
private Dictionary<MusicType, CancellationTokenSource> _cancellationTokenSources = new();
|
||||
private Dictionary<MusicType, AudioSource> _musicAudioSources = new();
|
||||
private Dictionary<MusicType, AudioMixerGroup> _musicAudioGroups = new();
|
||||
|
||||
public async UniTaskVoid PlayRandomMusicUntilHumanityWillBeDestroyedForTheySins(MusicType musicType)
|
||||
{
|
||||
if(!_musicAudioSources[musicType])
|
||||
{
|
||||
_musicAudioSources[musicType] = _audioSourcePool.GetSource();
|
||||
_musicAudioSources[musicType].spatialBlend = 0f;
|
||||
_musicAudioSources[musicType].outputAudioMixerGroup = _musicAudioGroups[musicType];
|
||||
}
|
||||
|
||||
_musicAudioSources[musicType].resource =
|
||||
_audioFactory.MusicDictionary[musicType][
|
||||
Random.Range(0, _audioFactory.MusicDictionary[musicType].Count)];
|
||||
|
||||
_musicAudioSources[musicType].Play();
|
||||
|
||||
// await UniTask.WaitUntilValueChanged(_musicAudioSources[musicType],
|
||||
// _ => !_musicAudioSources[musicType].isPlaying,
|
||||
// cancellationToken: _cancellationTokenSources[musicType].Token);
|
||||
await UniTask.NextFrame();
|
||||
// Debug.Log($"Playing {musicType}");
|
||||
var (isCanceled, _) = await UniTask.WaitUntilValueChanged(_musicAudioSources[musicType],
|
||||
_ => !_musicAudioSources[musicType].isPlaying,
|
||||
cancellationToken: _cancellationTokenSources[musicType].Token).SuppressCancellationThrow();
|
||||
// Debug.Log($"Finished {musicType}");
|
||||
|
||||
if (isCanceled)
|
||||
{
|
||||
// Debug.Log($"Cancelled {musicType}");
|
||||
_cancellationTokenSources[musicType].Dispose();
|
||||
_cancellationTokenSources[musicType] = new();
|
||||
|
||||
_audioSourcePool.ReleaseSource(_musicAudioSources[musicType]);
|
||||
_musicAudioSources[musicType] = null;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
PlayRandomMusicUntilHumanityWillBeDestroyedForTheySins(musicType);
|
||||
}
|
||||
|
||||
public async UniTaskVoid GladlyAskToStopMusic(MusicType musicType, AudioSnapshotState audioSnapshotState = AudioSnapshotState.None, float time = 1f, Action callback = null)
|
||||
{
|
||||
TransitToSnapshot(audioSnapshotState, time);
|
||||
|
||||
await UniTask.WaitForSeconds(time);
|
||||
|
||||
_cancellationTokenSources[musicType].Cancel();
|
||||
|
||||
callback?.Invoke();
|
||||
}
|
||||
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
|
||||
public void StopMusic()
|
||||
{
|
||||
_peacefulMusicSource.Stop();
|
||||
_actionMusicSource.Stop();
|
||||
}
|
||||
|
||||
public void GladlyAskToStopMusic(Action callback = null)
|
||||
{
|
||||
TransitToSnapshot(AudioSnapshotState.None);
|
||||
_peacefulMusicSource.Stop();
|
||||
_actionMusicSource.Stop();
|
||||
|
||||
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
|
||||
public void PlaySFX(SFXSounds sfxId, Vector3 position)
|
||||
{
|
||||
_audioSourcePool.PlayOneShot(_audioFactory.SFXAudios[(int)sfxId], position, _SFXGroup);
|
||||
}
|
||||
|
||||
public void PlayEnemy(EnemiesSounds enemySoundId, Vector3 position)
|
||||
{
|
||||
_audioSourcePool.PlayOneShot(_audioFactory.EnemiesAudios[(int)enemySoundId], position, _enemiesGroup);
|
||||
}
|
||||
|
||||
public void PlayDispatcher(DispatcherSounds dispatcherSoundId)
|
||||
{
|
||||
_audioSourcePool.PlayShizo(_audioFactory.DispatcherAudios[(int)dispatcherSoundId], _dispatcherGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf44cb051308463494bd930f2a3d31e4
|
||||
timeCreated: 1762625073
|
||||
@@ -0,0 +1,119 @@
|
||||
using System.Collections.Generic;
|
||||
using Code.Constants;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Code.Audio
|
||||
{
|
||||
public class AudioServiceDebug : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private AudioMixer mixer;
|
||||
|
||||
private AudioSource _actionMusicSource;
|
||||
private AudioSource _peacefulMusicSource;
|
||||
[SerializeField] private AudioSource prefab;
|
||||
|
||||
[SerializeField] private AudioResource[] peacefulAudio;
|
||||
[SerializeField] private AudioResource[] actionAudio;
|
||||
|
||||
private AudioMixerGroup _masterGroup,
|
||||
_musicGroup,
|
||||
_actionMusicGroup,
|
||||
_peacefulMusicGroup,
|
||||
_SFXGroup,
|
||||
_creaturesGroup,
|
||||
_dispatcherGroup,
|
||||
_courierGroup,
|
||||
_enemiesGroup;
|
||||
|
||||
private readonly AudioSourcePool _audioSourcePool = new();
|
||||
|
||||
private Dictionary<AudioSnapshotState, AudioMixerSnapshot> _snapshots = new();
|
||||
|
||||
[FormerlySerializedAs("sfxAudio")] [SerializeField] private AudioClip[] sfxAudios;
|
||||
[SerializeField] private AudioClip[] enemiesAudios;
|
||||
[SerializeField] private AudioClip[] dispatcherAudios;
|
||||
|
||||
private void MixerCreated()
|
||||
{
|
||||
_masterGroup = mixer.FindMatchingGroups(AudioGroups.MasterGroup)[0];
|
||||
_actionMusicGroup = mixer.FindMatchingGroups(AudioGroups.ActionMusicGroup)[0];
|
||||
_peacefulMusicGroup = mixer.FindMatchingGroups(AudioGroups.PeacefulMusicGroup)[0];
|
||||
_SFXGroup = mixer.FindMatchingGroups(AudioGroups.SFXGroup)[0];
|
||||
_musicGroup = mixer.FindMatchingGroups(AudioGroups.MusicGroup)[0];
|
||||
_creaturesGroup = mixer.FindMatchingGroups(AudioGroups.CreaturesGroup)[0];
|
||||
_dispatcherGroup = mixer.FindMatchingGroups(AudioGroups.DispatcherMusicGroup)[0];
|
||||
_courierGroup = mixer.FindMatchingGroups(AudioGroups.CourierMusicGroup)[0];
|
||||
_enemiesGroup = mixer.FindMatchingGroups(AudioGroups.EnemiesMusicGroup)[0];
|
||||
|
||||
_snapshots[AudioSnapshotState.Peaceful] = mixer.FindSnapshot(AudioGroups.PeacefulSnapshot);
|
||||
_snapshots[AudioSnapshotState.Action] = mixer.FindSnapshot(AudioGroups.ActionSnapshot);
|
||||
|
||||
// _audioSourcePool.Initialize(10,prefab);
|
||||
|
||||
InitializeMusicSources();
|
||||
}
|
||||
|
||||
private void InitializeMusicSources()
|
||||
{
|
||||
_actionMusicSource = _audioSourcePool.GetSource();
|
||||
_actionMusicSource.outputAudioMixerGroup = _actionMusicGroup;
|
||||
_actionMusicSource.spatialBlend = 0f;
|
||||
|
||||
_peacefulMusicSource = _audioSourcePool.GetSource();
|
||||
_peacefulMusicSource.outputAudioMixerGroup = _peacefulMusicGroup;
|
||||
_peacefulMusicSource.spatialBlend = 0f;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
MixerCreated();
|
||||
}
|
||||
|
||||
public void PlayRandomGameplayMusic()
|
||||
{
|
||||
_peacefulMusicSource.resource = peacefulAudio[Random.Range(0, peacefulAudio.Length)];
|
||||
_actionMusicSource.resource = actionAudio[Random.Range(0, actionAudio.Length)];
|
||||
|
||||
_peacefulMusicSource.Play();
|
||||
_actionMusicSource.Play();
|
||||
}
|
||||
|
||||
public void TransitToSnapshot(AudioSnapshotState state)
|
||||
{
|
||||
_snapshots[state].TransitionTo(1f);
|
||||
}
|
||||
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
public void PlaySFX(SFXSounds sfxId, Vector3 position)
|
||||
{
|
||||
_audioSourcePool.PlayOneShot(sfxAudios[(int)sfxId], position, _SFXGroup);
|
||||
}
|
||||
public void PlayDebugSFX()
|
||||
{
|
||||
_audioSourcePool.PlayOneShot(sfxAudios[(int)SFXSounds.Crowbar], transform.position, _SFXGroup);
|
||||
}
|
||||
public void PlayEnemy(EnemiesSounds enemySoundId, Vector3 position)
|
||||
{
|
||||
_audioSourcePool.PlayOneShot(enemiesAudios[(int)enemySoundId], position, _enemiesGroup);
|
||||
}
|
||||
public void PlayDebugEnemySFX()
|
||||
{
|
||||
_audioSourcePool.PlayOneShot(enemiesAudios[(int)EnemiesSounds.Bastard], transform.position, _enemiesGroup);
|
||||
}
|
||||
public void PlayDispatcher(DispatcherSounds dispatcherSoundId)
|
||||
{
|
||||
_audioSourcePool.PlayShizo(dispatcherAudios[(int)dispatcherSoundId], _dispatcherGroup);
|
||||
}
|
||||
public void PlayDebugDispatcherSFX()
|
||||
{
|
||||
_audioSourcePool.PlayShizo(dispatcherAudios[(int)DispatcherSounds.AhFreeman], _dispatcherGroup);
|
||||
}
|
||||
|
||||
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a42cad8f28f54a53bef23d9313014abd
|
||||
timeCreated: 1762805867
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Code.Audio
|
||||
{
|
||||
public enum AudioSnapshotState
|
||||
{
|
||||
None,
|
||||
Peaceful,
|
||||
Action,
|
||||
Menu
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29adaf8e912649d9b91c09735e36840a
|
||||
timeCreated: 1762808301
|
||||
@@ -0,0 +1,84 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.Pool;
|
||||
|
||||
namespace Code.Audio
|
||||
{
|
||||
public class AudioSourcePool
|
||||
{
|
||||
// The pool holds plain GameObjects (you can swap this for any component type).
|
||||
private IObjectPool<AudioSource> _pool;
|
||||
private GameObject _sourcePrefab;
|
||||
|
||||
public void Initialize(GameObject sourcePrefab)
|
||||
{
|
||||
_sourcePrefab = sourcePrefab;
|
||||
|
||||
// Create a pool with the four core callbacks.
|
||||
_pool = new ObjectPool<AudioSource>(
|
||||
createFunc: CreateItem,
|
||||
// actionOnGet: OnGet,
|
||||
actionOnRelease: OnRelease,
|
||||
actionOnDestroy: OnDestroyItem,
|
||||
collectionCheck: true, // helps catch double-release mistakes
|
||||
defaultCapacity: 10,
|
||||
maxSize: 20
|
||||
);
|
||||
}
|
||||
|
||||
// Creates a new pooled GameObject the first time (and whenever the pool needs more).
|
||||
private AudioSource CreateItem()
|
||||
{
|
||||
AudioSource audioSource = Object.Instantiate(_sourcePrefab).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)
|
||||
{
|
||||
AudioSource source = _pool.Get();
|
||||
source.PlayOneShot(clip);
|
||||
source.spatialBlend = 1f;
|
||||
source.transform.position = position;
|
||||
source.outputAudioMixerGroup = audioMixerGroup;
|
||||
|
||||
await UniTask.WaitUntilValueChanged(source, x => x.isPlaying);
|
||||
|
||||
_pool.Release(source);
|
||||
}
|
||||
public async UniTaskVoid PlayShizo(AudioClip clip, AudioMixerGroup audioMixerGroup)
|
||||
{
|
||||
AudioSource source = _pool.Get();
|
||||
source.PlayOneShot(clip);
|
||||
source.spatialBlend = 0f;
|
||||
source.outputAudioMixerGroup = audioMixerGroup;
|
||||
|
||||
await UniTask.WaitUntilValueChanged(source, x => x.isPlaying);
|
||||
|
||||
_pool.Release(source);
|
||||
}
|
||||
public AudioSource GetSource() => _pool.Get();
|
||||
public void ReleaseSource(AudioSource source) => _pool.Release(source);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 370b6a43a74744ff9d90a99991b104f7
|
||||
timeCreated: 1762852042
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
namespace Code.Audio
|
||||
{
|
||||
public interface IAudioFactory
|
||||
{
|
||||
List<AudioClip> SFXAudios { get; }
|
||||
List<AudioClip> EnemiesAudios { get; }
|
||||
List<AudioClip> DispatcherAudios { get; }
|
||||
AudioMixer AudioMixer { get; }
|
||||
Dictionary<MusicType, List<AudioClip>> MusicDictionary { get; }
|
||||
UniTask LoadAudioSourcePrefab(Action<GameObject> callback);
|
||||
UniTask WarmGameplayMusic();
|
||||
void ReleaseActionMusic();
|
||||
UniTask WarmMenuMusic();
|
||||
void ReleaseMenuMusic();
|
||||
UniTask WarmSFX();
|
||||
void ReleaseSFX();
|
||||
UniTask WarmEnemies();
|
||||
void ReleaseEnemies();
|
||||
UniTask WarmDispatcher();
|
||||
void ReleaseDispatcher();
|
||||
void ReleasePeacefulMusic();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea837e1ca08a4846b7f4ce2df771bf65
|
||||
timeCreated: 1762804793
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Audio
|
||||
{
|
||||
public interface IAudioService
|
||||
{
|
||||
UniTask Initialize();
|
||||
UniTaskVoid PlayRandomMusicUntilHumanityWillBeDestroyedForTheySins(MusicType musicType);
|
||||
UniTaskVoid GladlyAskToStopMusic(MusicType musicType, AudioSnapshotState audioSnapshotState = AudioSnapshotState.None, float time = 1f, Action callback = null);
|
||||
void StopMusic();
|
||||
void GladlyAskToStopMusic(Action callback = null);
|
||||
void TransitToSnapshot(AudioSnapshotState state, float time = 1f);
|
||||
void PlaySFX(SFXSounds sfxId, Vector3 position);
|
||||
void PlayEnemy(EnemiesSounds enemySoundId, Vector3 position);
|
||||
void PlayDispatcher(DispatcherSounds dispatcherSoundId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30521fadcce84848ae88363e915bceb4
|
||||
timeCreated: 1762804728
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Code.Audio
|
||||
{
|
||||
public enum MusicType
|
||||
{
|
||||
Menu,
|
||||
Peaceful,
|
||||
Action
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74ff08d5f1b741f69e37fc06fb07ae8d
|
||||
timeCreated: 1763151897
|
||||
@@ -2,7 +2,7 @@ using UnityEngine;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/AppConfig", fileName = "AppConfig")]
|
||||
[CreateAssetMenu(menuName = "Config/App", fileName = "AppConfig")]
|
||||
public class AppConfig : ScriptableObject
|
||||
{
|
||||
public GameObject infrastructureUnitPrefab;
|
||||
|
||||
@@ -0,0 +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 AudioMixer audioMixerAsset;
|
||||
public AssetReference audioSourcePrefab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 353cee8946ca43efbbcda905d7b32ae1
|
||||
timeCreated: 1762624627
|
||||
@@ -0,0 +1,38 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(fileName = "CameraConfig", menuName = "Config/CameraConfig")]
|
||||
public class CameraConfig : ScriptableObject
|
||||
{
|
||||
public float
|
||||
// Расстояния от персонажа до камеры
|
||||
defaultDistance = 6f, // Стандартное расстояние камеры от цели
|
||||
minDistance = 3f, // Минимальное расстояние при зуме
|
||||
maxDistance = 10f, // Максимальное расстояние при зуме
|
||||
|
||||
// Скорость зума камеры
|
||||
distanceMovementSpeed = 5f, // Множитель скорости изменения дистанции при зуме
|
||||
|
||||
// Скорость поворота камеры
|
||||
rotationSpeed = 0.3f, // Множитель скорости вращения камеры
|
||||
|
||||
// Скорость интерполяции текущее -> целевое вращение
|
||||
rotationSharpness = 100f, // Коэффициент плавности вращения камеры (чем выше - тем резче)
|
||||
|
||||
// Резкость следования камеры за целью
|
||||
followSharpness = 100f, // Коэффициент плавности следования за движущейся целью (чем выше - тем резче)
|
||||
|
||||
// Углы наклона камеры
|
||||
minVerticalAngle = -70f, // Минимальный угол наклона камеры (вниз)
|
||||
maxVerticalAngle = 70f, // Максимальный угол наклона камеры (вверх)
|
||||
defaultVerticalAngle = 10f; // Стандартный угол наклона камеры
|
||||
|
||||
// Позиция следования по умолчанию
|
||||
public Vector3 defaultFollowPosition = Vector3.zero;
|
||||
|
||||
// Префаб камеры
|
||||
public Camera cameraPrefab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72fbf590e5fd4747acfdd32eb26bba3a
|
||||
timeCreated: 1761637489
|
||||
@@ -0,0 +1,41 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(fileName = "CharacterConfig", menuName = "Config/CharacterConfig")]
|
||||
public class CharacterConfig : ScriptableObject
|
||||
{
|
||||
// Основное движение по земле
|
||||
public float
|
||||
maxStableMoveSpeed = 8f, // Максимальная скорость движения по устойчивой поверхности
|
||||
stableMovementSharpness = 15f, // Резкость изменения скорости движения (чем выше - тем резче)
|
||||
orientationSharpness = 10f, // Резкость изменения вращения персонажа (чем выше - тем резче)
|
||||
jumpSpeed = 10f; // Скорость прыжка
|
||||
|
||||
// Спринт
|
||||
public float
|
||||
sprintMoveSpeed = 12f, // Максимальная скорость спринта
|
||||
sprintAngleThreshold = 90f; // Максимальный угол (в градусах) от направления вперёд, при котором разрешён спринт
|
||||
|
||||
// Слайд
|
||||
public float
|
||||
slideSpeed = 20f, // Скорость слайда
|
||||
slideDuration = 0.8f, // Длительность слайда в секундах
|
||||
slideCooldown = 1.5f; // Время перезарядки слайда в секундах
|
||||
|
||||
// Залазание на стены
|
||||
public float
|
||||
wallClimbSpeedFactor = 0.8f, // Коэффициент преобразования горизонтальной скорости в вертикальную при залазании на стену
|
||||
minWallClimbSpeed = 9f, // Минимальная горизонтальная скорость для начала залазания на стену
|
||||
wallDetectionAngleThreshold = 80f; // Максимальный угол (в градусах) от вертикали, при котором поверхность считается "стеной"
|
||||
|
||||
// Наклон при залазании на стены
|
||||
public float
|
||||
maxWallLeanAngle = 45f, // Максимальный угол наклона от стены (в градусах)
|
||||
wallLeanSharpness = 50f, // Скорость наклона/выпрямления (чем выше — тем резче)
|
||||
wallLeanHeightScale = 0.1f; // Множитель: на сколько метров подъёма = 1 единица "наклона"
|
||||
|
||||
// Гравитация
|
||||
public Vector3 gravity = new(0f, -30f, 0f); // Вектор, отвечающий за применение гравитации
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10cfaf8e57f64eddb8c2eda147e4739a
|
||||
timeCreated: 1761723608
|
||||
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Audio/CharacterSoundList", fileName = "CharacterSoundListConfig")]
|
||||
public class CharacterSoundListConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference[] character;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83304a98bbdc4e7c9c7c643653ae1368
|
||||
timeCreated: 1762625438
|
||||
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Enemies/Cockroach", fileName = "CockroachConfig")]
|
||||
public class CockroachConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference cockroachPrefab;
|
||||
|
||||
public int damage = 2;
|
||||
public float attackCooldown = 1.5f;
|
||||
|
||||
public float detectionRange = 20f;
|
||||
public float attackRange = 1.3f;
|
||||
|
||||
public float speed = 6f;
|
||||
|
||||
public bool isStunnable;
|
||||
public float stunDuration;
|
||||
|
||||
public bool usesIdleMovement = true;
|
||||
public float idleWanderRadius = 3f;
|
||||
public float idleMoveDurationMin = 0.3f;
|
||||
public float idleMoveDurationMax = 1f;
|
||||
public float idlePauseDurationMin = 0.1f;
|
||||
public float idlePauseDurationMax = 0.8f;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bc162d3127949aa950d0738beee99a4
|
||||
timeCreated: 1763571220
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Audio/DispatcherSoundList", fileName = "DispatcherSoundListConfig")]
|
||||
public class DispatcherSoundListConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference[] dispatcher;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a6f6ffb8f5242899791719801791945
|
||||
timeCreated: 1762625431
|
||||
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Enemies/DrunkenGrandpa", fileName = "DrunkenGrandpaConfig")]
|
||||
public class DrunkenGrandpaConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference drunkenGrandpaPrefab;
|
||||
|
||||
public int damage = 2;
|
||||
public float attackCooldown = 5f;
|
||||
|
||||
public float detectionRange = 10f;
|
||||
public float attackRange = 1.5f;
|
||||
|
||||
public float speed = 3f;
|
||||
|
||||
public bool isStunnable = true;
|
||||
public float stunDuration = 3f;
|
||||
|
||||
public bool usesIdleMovement = true;
|
||||
public float idleWanderRadius = 5f;
|
||||
public float idleMoveDurationMin = 1f;
|
||||
public float idleMoveDurationMax = 5f;
|
||||
public float idlePauseDurationMin = 3f;
|
||||
public float idlePauseDurationMax = 5f;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d157e8891074b90957a7434cff0ae71
|
||||
timeCreated: 1763569096
|
||||
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Audio/EnemiesSoundList", fileName = "EnemiesSoundListConfig")]
|
||||
public class EnemiesSoundListConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference[] enemies;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e73ac7f7e3cd4db8ada95f63d73c2d1d
|
||||
timeCreated: 1762625425
|
||||
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Enemies/Fog", fileName = "FogConfig")]
|
||||
public class FogConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference fogPrefab;
|
||||
|
||||
public int damage = int.MaxValue;
|
||||
public float attackCooldown;
|
||||
|
||||
public float detectionRange;
|
||||
public float attackRange = 5f;
|
||||
|
||||
public float speed = 1.5f;
|
||||
|
||||
public bool isStunnable;
|
||||
public float stunDuration;
|
||||
|
||||
public bool usesIdleMovement;
|
||||
public float idleWanderRadius;
|
||||
public float idleMoveDurationMin;
|
||||
public float idleMoveDurationMax;
|
||||
public float idlePauseDurationMin;
|
||||
public float idlePauseDurationMax;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa4dd2a5cce24902a2918488b5751f2f
|
||||
timeCreated: 1763581410
|
||||
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Player", fileName = "PlayerConfig")]
|
||||
public class PlayerConfig : ScriptableObject
|
||||
{
|
||||
public int maxHealth;
|
||||
|
||||
public AssetReference characterPrefab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 425c2ad28dbe4552acd1564f64372558
|
||||
timeCreated: 1761591274
|
||||
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Audio/SFXList", fileName = "SFXListConfig")]
|
||||
public class SFXListConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference[] SFX;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be49de18297645009c1e2092f382a670
|
||||
timeCreated: 1762625417
|
||||
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/Audio/SoundtrackList", fileName = "SoundtrackListConfig")]
|
||||
public class SoundtrackListConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference[] peacefulSoundtrack;
|
||||
public AssetReference[] actionSoundtrack;
|
||||
public AssetReference[] menuSoundtrack;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d4b28e4552d456d99550b6d91467345
|
||||
timeCreated: 1762624980
|
||||
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Configs
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Config/UI", fileName = "UIConfig")]
|
||||
public class UIConfig : ScriptableObject
|
||||
{
|
||||
public AssetReference[] uiPanelsAssetReferences;
|
||||
public AssetReference canvasAssetReference;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: feaa36c74e094e0aa24b3983957a6e4e
|
||||
timeCreated: 1761591380
|
||||
@@ -6,4 +6,26 @@ namespace Code.Constants
|
||||
public const string ConfigMultiple = "Configs/{0}";
|
||||
|
||||
}
|
||||
public static class Tags
|
||||
{
|
||||
public const string LoadingScreen = "LoadingScreen";
|
||||
}
|
||||
public static class AudioGroups
|
||||
{
|
||||
public const string MasterGroup = "Master";
|
||||
public const string SFXGroup = "SFX";
|
||||
public const string CreaturesGroup = "Creatures";
|
||||
public const string MusicGroup = "Music";
|
||||
public const string PeacefulMusicGroup = "Peaceful";
|
||||
public const string ActionMusicGroup = "Action";
|
||||
public const string DispatcherMusicGroup = "Dispatcher";
|
||||
public const string CourierMusicGroup = "Courier";
|
||||
public const string EnemiesMusicGroup = "Enemies";
|
||||
|
||||
public const string PeacefulSnapshot = "Peaceful";
|
||||
public const string ActionSnapshot = "Action";
|
||||
public const string NoneSnapshot = "None";
|
||||
public const string MenuSnapshot = "Menu";
|
||||
public const string MenuMusicGroup = "Menu";
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8d4b5b0fbd947b093f98937d7b80f8e
|
||||
timeCreated: 1760423477
|
||||
guid: e4901b413afd4d7da914edf2a1e51f8f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fae52abe6b44ad5bdd6e67876fe940a
|
||||
timeCreated: 1761671702
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace Code.Gameplay.Camera
|
||||
{
|
||||
/*
|
||||
* Перечисление режимов работы камеры
|
||||
* MainMenu - статичная камера, смотрит на заданную позицию (то что надо в главном меню)
|
||||
* Static - статичная камера без следования за целью
|
||||
* FirstPerson - камера от первого лица (встроена в модель персонажа)
|
||||
* ThirdPerson - камера от третьего лица (следует за персонажем на расстоянии)
|
||||
* Cinematic - кинематографическая камера для скриптовых сцен
|
||||
*/
|
||||
public enum CameraMode
|
||||
{
|
||||
Bogdan,
|
||||
Static,
|
||||
UltraStatic,
|
||||
FirstPerson,
|
||||
ThirdPerson,
|
||||
Cinematic
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a49105845a7435b9179e402fa7b8e30
|
||||
timeCreated: 1761570884
|
||||
@@ -0,0 +1,26 @@
|
||||
using Code.Configs;
|
||||
using Code.Gameplay.Camera.CameraStates;
|
||||
using Code.StateMachine;
|
||||
|
||||
namespace Code.Gameplay.Camera
|
||||
{
|
||||
public class CameraStateMachine : AbstractStateMachine<CameraMode, CameraStateMachineContext>
|
||||
{
|
||||
// Текущий режим работы камеры
|
||||
public override void Initialize()
|
||||
{
|
||||
States.Add(CameraMode.Static, new StaticState(StateMachineContext));
|
||||
States.Add(CameraMode.UltraStatic, new UltraStaticState(StateMachineContext));
|
||||
States.Add(CameraMode.FirstPerson, new FirstPersonState(StateMachineContext));
|
||||
States.Add(CameraMode.ThirdPerson, new ThirdPersonState(StateMachineContext));
|
||||
|
||||
CurrentBaseState = States[CameraMode.UltraStatic];
|
||||
}
|
||||
|
||||
|
||||
protected override bool CheckTransitionAllowed(CameraMode nextState) => true;
|
||||
|
||||
protected override void ResetAllowedTransitions()
|
||||
{ }
|
||||
}
|
||||
}
|
||||
Loaded 100 of 814 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user