Add MusicController and related assets; implement music playback features with crossfade option
This commit is contained in:
parent
d21b06a365
commit
71c4d1123b
1
Assets/Resources/PerformanceTestRunInfo.json
Normal file
1
Assets/Resources/PerformanceTestRunInfo.json
Normal file
@ -0,0 +1 @@
|
||||
{"TestSuite":"","Date":0,"Player":{"Development":false,"ScreenWidth":0,"ScreenHeight":0,"ScreenRefreshRate":0,"Fullscreen":false,"Vsync":0,"AntiAliasing":0,"Batchmode":false,"RenderThreadingMode":"Split","MtRendering":false,"GraphicsJobs":false,"GpuSkinning":false,"Platform":"","ColorSpace":"","AnisotropicFiltering":"","BlendWeights":"","GraphicsApi":"","ScriptingBackend":"IL2CPP","AndroidTargetSdkVersion":"AndroidApiLevelAuto","AndroidBuildSystem":"Gradle","BuildTarget":"StandaloneWindows64","StereoRenderingPath":"MultiPass"},"Hardware":{"OperatingSystem":"","DeviceModel":"","DeviceName":"","ProcessorType":"","ProcessorCount":0,"GraphicsDeviceName":"","SystemMemorySizeMB":0},"Editor":{"Version":"6000.2.7f2","Branch":"6000.2/respin/6000.2.7f1-2eb0c79396db","Changeset":"2b518236b676","Date":1759317804},"Dependencies":["com.unity.cinemachine@3.1.4","com.unity.collab-proxy@2.9.3","com.unity.feature.2d@2.0.1","com.unity.ide.rider@3.0.38","com.unity.ide.visualstudio@2.0.25","com.unity.inputsystem@1.14.2","com.unity.multiplayer.center@1.0.0","com.unity.render-pipelines.universal@17.2.0","com.unity.test-framework@1.6.0","com.unity.timeline@1.8.9","com.unity.ugui@2.0.0","com.unity.visualeffectgraph@17.2.0","com.unity.visualscripting@1.9.8","com.unity.modules.accessibility@1.0.0","com.unity.modules.ai@1.0.0","com.unity.modules.androidjni@1.0.0","com.unity.modules.animation@1.0.0","com.unity.modules.assetbundle@1.0.0","com.unity.modules.audio@1.0.0","com.unity.modules.cloth@1.0.0","com.unity.modules.director@1.0.0","com.unity.modules.imageconversion@1.0.0","com.unity.modules.imgui@1.0.0","com.unity.modules.jsonserialize@1.0.0","com.unity.modules.particlesystem@1.0.0","com.unity.modules.physics@1.0.0","com.unity.modules.physics2d@1.0.0","com.unity.modules.screencapture@1.0.0","com.unity.modules.terrain@1.0.0","com.unity.modules.terrainphysics@1.0.0","com.unity.modules.tilemap@1.0.0","com.unity.modules.ui@1.0.0","com.unity.modules.uielements@1.0.0","com.unity.modules.umbra@1.0.0","com.unity.modules.unityanalytics@1.0.0","com.unity.modules.unitywebrequest@1.0.0","com.unity.modules.unitywebrequestassetbundle@1.0.0","com.unity.modules.unitywebrequestaudio@1.0.0","com.unity.modules.unitywebrequesttexture@1.0.0","com.unity.modules.unitywebrequestwww@1.0.0","com.unity.modules.vehicles@1.0.0","com.unity.modules.video@1.0.0","com.unity.modules.vr@1.0.0","com.unity.modules.wind@1.0.0","com.unity.modules.xr@1.0.0","com.unity.modules.subsystems@1.0.0","com.unity.modules.hierarchycore@1.0.0","com.unity.shadergraph@17.2.0","com.unity.render-pipelines.core@17.2.0","com.unity.ext.nunit@2.0.5","com.unity.render-pipelines.universal-config@17.0.3","com.unity.2d.animation@12.0.2","com.unity.2d.pixel-perfect@5.1.0","com.unity.2d.psdimporter@11.0.1","com.unity.2d.sprite@1.0.0","com.unity.2d.spriteshape@12.0.1","com.unity.2d.tilemap@1.0.0","com.unity.2d.tilemap.extras@5.0.1","com.unity.2d.aseprite@2.0.2","com.unity.splines@2.8.2","com.unity.burst@1.8.25","com.unity.mathematics@1.3.2","com.unity.collections@2.5.7","com.unity.rendering.light-transport@1.0.1","com.unity.searcher@4.9.3","com.unity.2d.common@11.0.1","com.unity.settings-manager@2.1.0","com.unity.nuget.mono-cecil@1.11.5","com.unity.test-framework.performance@3.2.0"],"Results":[]}
|
||||
7
Assets/Resources/PerformanceTestRunInfo.json.meta
Normal file
7
Assets/Resources/PerformanceTestRunInfo.json.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c92c4255d2109de49a595dc777ce85b5
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1
Assets/Resources/PerformanceTestRunSettings.json
Normal file
1
Assets/Resources/PerformanceTestRunSettings.json
Normal file
@ -0,0 +1 @@
|
||||
{"MeasurementCount":-1}
|
||||
7
Assets/Resources/PerformanceTestRunSettings.json.meta
Normal file
7
Assets/Resources/PerformanceTestRunSettings.json.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6f45e0ef6f94a74eafd0fc7ec1cf938
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -2699,9 +2699,9 @@ Rigidbody2D:
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_Interpolate: 0
|
||||
m_Interpolate: 1
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_CollisionDetection: 1
|
||||
m_Constraints: 4
|
||||
--- !u!60 &683509761572695280
|
||||
PolygonCollider2D:
|
||||
|
||||
8
Assets/SFX/Music/DO_NOT_USE_MUSIC.meta
Normal file
8
Assets/SFX/Music/DO_NOT_USE_MUSIC.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0889db0aca396664abddd48ca800942e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/SFX/Music/DO_NOT_USE_MUSIC/DO_NOT_USE_1.mp3
Normal file
BIN
Assets/SFX/Music/DO_NOT_USE_MUSIC/DO_NOT_USE_1.mp3
Normal file
Binary file not shown.
23
Assets/SFX/Music/DO_NOT_USE_MUSIC/DO_NOT_USE_1.mp3.meta
Normal file
23
Assets/SFX/Music/DO_NOT_USE_MUSIC/DO_NOT_USE_1.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 862c6390b07d61c43bef1881127c4d36
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/SFX/Music/music_Level_1.mp3
Normal file
BIN
Assets/SFX/Music/music_Level_1.mp3
Normal file
Binary file not shown.
23
Assets/SFX/Music/music_Level_1.mp3.meta
Normal file
23
Assets/SFX/Music/music_Level_1.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a30c29718ace1c468575da20ba204f1
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/SFX/Music/music_MainMenu.mp3
Normal file
BIN
Assets/SFX/Music/music_MainMenu.mp3
Normal file
Binary file not shown.
23
Assets/SFX/Music/music_MainMenu.mp3.meta
Normal file
23
Assets/SFX/Music/music_MainMenu.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0296787b59f9f248b8361070a74a2b5
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -119,6 +119,56 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &223226
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 223228}
|
||||
- component: {fileID: 223227}
|
||||
m_Layer: 0
|
||||
m_Name: Music
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &223227
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 223226}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 66bc203e34559bc48a35861084992cf5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
audioManager: {fileID: 0}
|
||||
musicClip: {fileID: 8300000, guid: 3a30c29718ace1c468575da20ba204f1, type: 3}
|
||||
musicVolume: 0.2
|
||||
loop: 1
|
||||
useCrossfade: 1
|
||||
fadeDuration: 3
|
||||
--- !u!4 &223228
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 223226}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 220.89835, y: 44.50611, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!60 &2920184 stripped
|
||||
PolygonCollider2D:
|
||||
m_CorrespondingSourceObject: {fileID: 8872464155886732166, guid: 67e6c76bc4c4797499f5b2a55fc7ab4a, type: 3}
|
||||
@ -50173,6 +50223,16 @@ Tilemap:
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 151, y: 5, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 2
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 152, y: 5, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
@ -50616,13 +50676,23 @@ Tilemap:
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 9
|
||||
m_TileSpriteIndex: 5
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 153, y: 6, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 9
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 154, y: 6, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
@ -78664,20 +78734,20 @@ Tilemap:
|
||||
m_AllTileFlags: 1073741826
|
||||
m_AnimatedTiles: {}
|
||||
m_TileAssetArray:
|
||||
- m_RefCount: 7712
|
||||
- m_RefCount: 7714
|
||||
m_Data: {fileID: 11400000, guid: 84c3e202f87c5384f801e1d6d76bfda3, type: 2}
|
||||
m_TileSpriteArray:
|
||||
- m_RefCount: 42
|
||||
m_Data: {fileID: 2632754532777870510, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 6499
|
||||
m_Data: {fileID: 2718513996814743820, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 438
|
||||
- m_RefCount: 439
|
||||
m_Data: {fileID: 4206299883402668752, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 52
|
||||
m_Data: {fileID: 4862551027066036021, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 81
|
||||
m_Data: {fileID: -5871628898940079882, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 386
|
||||
- m_RefCount: 387
|
||||
m_Data: {fileID: -1895669345893792418, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 71
|
||||
m_Data: {fileID: -6055767957282799819, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
@ -78698,7 +78768,7 @@ Tilemap:
|
||||
- m_RefCount: 0
|
||||
m_Data: {fileID: 0}
|
||||
m_TileMatrixArray:
|
||||
- m_RefCount: 7712
|
||||
- m_RefCount: 7714
|
||||
m_Data:
|
||||
e00: 1
|
||||
e01: 0
|
||||
@ -78717,7 +78787,7 @@ Tilemap:
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_TileColorArray:
|
||||
- m_RefCount: 7712
|
||||
- m_RefCount: 7714
|
||||
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TileObjectToInstantiateArray: []
|
||||
m_AnimationFrameRate: 1
|
||||
@ -283682,6 +283752,16 @@ Tilemap:
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 151, y: 5, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 1
|
||||
m_TileSpriteIndex: 12
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 1
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 152, y: 5, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 1
|
||||
@ -285765,13 +285845,23 @@ Tilemap:
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 1
|
||||
m_TileSpriteIndex: 4
|
||||
m_TileSpriteIndex: 8
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 1
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 153, y: 6, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 1
|
||||
m_TileSpriteIndex: 4
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 1
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741826
|
||||
- first: {x: 154, y: 6, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 1
|
||||
@ -325295,7 +325385,7 @@ Tilemap:
|
||||
m_TileAssetArray:
|
||||
- m_RefCount: 2
|
||||
m_Data: {fileID: 11400000, guid: 4de9f2b5a2b20d24389da0709d1ce379, type: 2}
|
||||
- m_RefCount: 13615
|
||||
- m_RefCount: 13617
|
||||
m_Data: {fileID: 11400000, guid: 84c3e202f87c5384f801e1d6d76bfda3, type: 2}
|
||||
- m_RefCount: 4
|
||||
m_Data: {fileID: 11400000, guid: 853ecd74b2c813744873829ce502e3b7, type: 2}
|
||||
@ -325318,7 +325408,7 @@ Tilemap:
|
||||
m_Data: {fileID: 6628536997565749602, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 70
|
||||
m_Data: {fileID: -4924701994791171026, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 727
|
||||
- m_RefCount: 728
|
||||
m_Data: {fileID: -1895669345893792418, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 78
|
||||
m_Data: {fileID: -6055767957282799819, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
@ -325326,14 +325416,14 @@ Tilemap:
|
||||
m_Data: {fileID: 4862551027066036021, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 11692
|
||||
m_Data: {fileID: 2718513996814743820, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 758
|
||||
- m_RefCount: 759
|
||||
m_Data: {fileID: 4206299883402668752, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 93
|
||||
m_Data: {fileID: -5871628898940079882, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
- m_RefCount: 55
|
||||
m_Data: {fileID: 2632754532777870510, guid: d440231d6f96217499ab62926952e2b3, type: 3}
|
||||
m_TileMatrixArray:
|
||||
- m_RefCount: 13621
|
||||
- m_RefCount: 13623
|
||||
m_Data:
|
||||
e00: 1
|
||||
e01: 0
|
||||
@ -325354,7 +325444,7 @@ Tilemap:
|
||||
m_TileColorArray:
|
||||
- m_RefCount: 0
|
||||
m_Data: {r: 4.5e-44, g: 4.5e-44, b: 4.5e-44, a: 4.5e-44}
|
||||
- m_RefCount: 13621
|
||||
- m_RefCount: 13623
|
||||
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
||||
- m_RefCount: 0
|
||||
m_Data: {r: 1.2578e-40, g: 1.2578e-40, b: 1.2578e-40, a: 1.2578e-40}
|
||||
@ -325561,35 +325651,45 @@ CompositeCollider2D:
|
||||
Y: 50390624
|
||||
- X: 1513828096
|
||||
Y: 50195312
|
||||
- X: 1519374976
|
||||
- X: 1516601600
|
||||
Y: 50195312
|
||||
- X: 1519960960
|
||||
Y: 50273436
|
||||
- X: 1520000000
|
||||
Y: 51054688
|
||||
Y: 50351564
|
||||
- X: 1520000000
|
||||
Y: 60390624
|
||||
Y: 50390624
|
||||
- X: 1523828096
|
||||
Y: 60195312
|
||||
- X: 1526601600
|
||||
Y: 60195312
|
||||
- X: 1529960960
|
||||
Y: 60273436
|
||||
Y: 50195312
|
||||
- X: 1529374976
|
||||
Y: 50195312
|
||||
- X: 1530000000
|
||||
Y: 60351564
|
||||
Y: 51054688
|
||||
- X: 1530000000
|
||||
Y: 60468752
|
||||
- X: 1533906304
|
||||
Y: 60273436
|
||||
- X: 1536054656
|
||||
Y: 60273436
|
||||
- X: 1539374976
|
||||
Y: 60390624
|
||||
- X: 1533828096
|
||||
Y: 60195312
|
||||
- X: 1536601600
|
||||
Y: 60195312
|
||||
- X: 1539960960
|
||||
Y: 60273436
|
||||
- X: 1540000000
|
||||
Y: 60351564
|
||||
- X: 1540000000
|
||||
Y: 60468752
|
||||
- X: 1543906304
|
||||
Y: 60273436
|
||||
- X: 1546054656
|
||||
Y: 60273436
|
||||
- X: 1549374976
|
||||
Y: 60390624
|
||||
- X: 1550000000
|
||||
Y: 60546876
|
||||
- X: 1540000000
|
||||
- X: 1550000000
|
||||
Y: 69296872
|
||||
- X: 1539843712
|
||||
- X: 1549843712
|
||||
Y: 69414064
|
||||
- X: 1538945280
|
||||
- X: 1548945280
|
||||
Y: 70000000
|
||||
- X: 1500000000
|
||||
Y: 70000000
|
||||
@ -336237,21 +336337,26 @@ CompositeCollider2D:
|
||||
- {x: 151, y: 5.0351624}
|
||||
- {x: 151.00003, y: 5.039061}
|
||||
- {x: 151.38281, y: 5.0195312}
|
||||
- {x: 151.93752, y: 5.019542}
|
||||
- {x: 152, y: 5.1054773}
|
||||
- {x: 152.00003, y: 6.039061}
|
||||
- {x: 152.38281, y: 6.0195312}
|
||||
- {x: 152.66016, y: 6.0195312}
|
||||
- {x: 152.99611, y: 6.027358}
|
||||
- {x: 153, y: 6.0351624}
|
||||
- {x: 153.00003, y: 6.0468736}
|
||||
- {x: 153.39062, y: 6.0273438}
|
||||
- {x: 153.60547, y: 6.0273438}
|
||||
- {x: 153.9375, y: 6.0390635}
|
||||
- {x: 154, y: 6.0547094}
|
||||
- {x: 153.99998, y: 6.929695}
|
||||
- {x: 153.98438, y: 6.9414062}
|
||||
- {x: 153.89452, y: 7}
|
||||
- {x: 151.66016, y: 5.0195312}
|
||||
- {x: 151.99611, y: 5.027358}
|
||||
- {x: 152, y: 5.0351624}
|
||||
- {x: 152.00003, y: 5.039061}
|
||||
- {x: 152.38281, y: 5.0195312}
|
||||
- {x: 152.93752, y: 5.019542}
|
||||
- {x: 153, y: 5.1054773}
|
||||
- {x: 153.00003, y: 6.039061}
|
||||
- {x: 153.38281, y: 6.0195312}
|
||||
- {x: 153.66016, y: 6.0195312}
|
||||
- {x: 153.99611, y: 6.027358}
|
||||
- {x: 154, y: 6.0351624}
|
||||
- {x: 154.00003, y: 6.0468736}
|
||||
- {x: 154.39062, y: 6.0273438}
|
||||
- {x: 154.60547, y: 6.0273438}
|
||||
- {x: 154.9375, y: 6.0390635}
|
||||
- {x: 155, y: 6.0547094}
|
||||
- {x: 154.99998, y: 6.929695}
|
||||
- {x: 154.98438, y: 6.9414062}
|
||||
- {x: 154.89452, y: 7}
|
||||
- {x: 150, y: 7.0000296}
|
||||
- {x: 150.00003, y: 13.039061}
|
||||
- {x: 150.38281, y: 13.019531}
|
||||
@ -384479,3 +384584,4 @@ SceneRoots:
|
||||
- {fileID: 5189102261111869253}
|
||||
- {fileID: 523566710}
|
||||
- {fileID: 283858835}
|
||||
- {fileID: 223228}
|
||||
|
||||
@ -132,6 +132,7 @@ GameObject:
|
||||
- component: {fileID: 28542764}
|
||||
- component: {fileID: 28542767}
|
||||
- component: {fileID: 28542766}
|
||||
- component: {fileID: 28542768}
|
||||
m_Layer: 5
|
||||
m_Name: LevelSelectModal
|
||||
m_TagString: Untagged
|
||||
@ -227,6 +228,21 @@ CanvasGroup:
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!114 &28542768
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 28542762}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c815924369a0a64458e3c85a564de8b8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::RR.Common.UI.ModalFocusTrap
|
||||
modalRoot: {fileID: 28542762}
|
||||
firstSelected: {fileID: 0}
|
||||
enforce: 1
|
||||
--- !u!1 &112549351
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1017,8 +1033,8 @@ MonoBehaviour:
|
||||
m_TargetGraphic: {fileID: 434895586}
|
||||
m_HandleRect: {fileID: 434895585}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: 1
|
||||
m_Value: 0
|
||||
m_Size: 0.9999941
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
@ -2354,6 +2370,56 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 915148287}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &915673354
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 915673356}
|
||||
- component: {fileID: 915673355}
|
||||
m_Layer: 0
|
||||
m_Name: Music
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &915673355
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 915673354}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 66bc203e34559bc48a35861084992cf5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
audioManager: {fileID: 0}
|
||||
musicClip: {fileID: 8300000, guid: b0296787b59f9f248b8361070a74a2b5, type: 3}
|
||||
musicVolume: 0.2
|
||||
loop: 1
|
||||
useCrossfade: 1
|
||||
fadeDuration: 3
|
||||
--- !u!4 &915673356
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 915673354}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 220.89835, y: 44.50611, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &949906051
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4474,7 +4540,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.000023633147}
|
||||
m_AnchoredPosition: {x: 0, y: 0.000704448}
|
||||
m_SizeDelta: {x: 0, y: 300}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &1792218764
|
||||
@ -4952,8 +5018,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 16ac12688a958d34983f6f0307a045ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
sfxAsset: {fileID: 0}
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
--- !u!61 &1925001481
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -10191,8 +10257,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 16ac12688a958d34983f6f0307a045ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
sfxAsset: {fileID: 0}
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
--- !u!1 &1976298767889346999
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -10492,8 +10558,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 16ac12688a958d34983f6f0307a045ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
sfxAsset: {fileID: 0}
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
--- !u!4 &2347305775932578288
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -24512,8 +24578,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 16ac12688a958d34983f6f0307a045ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
sfxAsset: {fileID: 0}
|
||||
config: {fileID: 11400000, guid: 1db1421e9cc6f214f9b91a29eba61e76, type: 2}
|
||||
--- !u!4 &4934570997528600992
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -31475,3 +31541,4 @@ SceneRoots:
|
||||
- {fileID: 1628533781}
|
||||
- {fileID: 1174864873}
|
||||
- {fileID: 1378233909}
|
||||
- {fileID: 915673356}
|
||||
|
||||
@ -7,7 +7,6 @@ using Random = UnityEngine.Random;
|
||||
|
||||
namespace RR.Common.Managers
|
||||
{
|
||||
|
||||
public class AudioManager : MonoBehaviour
|
||||
{
|
||||
// ==== Singleton ====
|
||||
|
||||
31
Assets/Scripts/Behaviour/Controllers/MusicController.cs
Normal file
31
Assets/Scripts/Behaviour/Controllers/MusicController.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using RR.Common.Managers;
|
||||
using RR.Game2D.Core.Managers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RR.Common.Controllers
|
||||
{
|
||||
public class MusicController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private AudioManager audioManager;
|
||||
[SerializeField] private AudioClip musicClip;
|
||||
[SerializeField] private float musicVolume = -1f;
|
||||
[SerializeField] private bool loop = true;
|
||||
|
||||
[SerializeField] private bool useCrossfade = false;
|
||||
[SerializeField] private float fadeDuration = -1f;
|
||||
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (audioManager == null) audioManager = GameManager.Instance.Audio;
|
||||
|
||||
if (!musicClip) return;
|
||||
|
||||
if (useCrossfade)
|
||||
audioManager.CrossfadeMusic(musicClip, fadeDuration, loop, musicVolume);
|
||||
else
|
||||
audioManager.PlayMusicImmediate(musicClip, loop, musicVolume);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66bc203e34559bc48a35861084992cf5
|
||||
8
Assets/Scripts/Editor.meta
Normal file
8
Assets/Scripts/Editor.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4c1756dfd2ae9f499555c27329d953c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Scripts/Editor/MusicControlEditor.uxml
Normal file
9
Assets/Scripts/Editor/MusicControlEditor.uxml
Normal file
@ -0,0 +1,9 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
|
||||
<uie:ObjectField label="Audio Manager" enabled="false" data-source-type="RR.Common.Controllers.MusicController, Assembly-CSharp" data-source-path="audioManager" type="RR.Common.Managers.AudioManager, Assembly-CSharp" binding-path="audioManager" />
|
||||
<uie:ObjectField label="Music Clip" type="UnityEngine.AudioClip, UnityEngine.AudioModule" data-source-type="RR.Common.Controllers.MusicController, Assembly-CSharp" data-source-path="musicClip" binding-path="musicClip" />
|
||||
<ui:FloatField label="Music Volume" value="-1" data-source-type="RR.Common.Controllers.MusicController, Assembly-CSharp" data-source-path="musicVolume" binding-path="musicVolume" />
|
||||
<ui:Toggle label="Loop" data-source-type="RR.Common.Controllers.MusicController, Assembly-CSharp" data-source-path="loop" binding-path="loop" />
|
||||
<ui:Foldout text="Use Crossfade" name="Foldout" toggle-on-label-click="true" data-source-type="RR.Common.Controllers.MusicController, Assembly-CSharp" data-source-path="useCrossfade" enabled="true" binding-path="useCrossfade">
|
||||
<ui:FloatField label="Fade Duration" value="-1" password="false" data-source-type="RR.Common.Controllers.MusicController, Assembly-CSharp" data-source-path="fadeDuration" binding-path="fadeDuration" />
|
||||
</ui:Foldout>
|
||||
</ui:UXML>
|
||||
10
Assets/Scripts/Editor/MusicControlEditor.uxml.meta
Normal file
10
Assets/Scripts/Editor/MusicControlEditor.uxml.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b532ec376f7b2c47911b2066ae8b3bc
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
23
Assets/Scripts/Editor/MusicController_Inspector.cs
Normal file
23
Assets/Scripts/Editor/MusicController_Inspector.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using RR.Common.Controllers;
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
[CustomEditor(typeof(MusicController))]
|
||||
public class MusicController_Inspector : Editor
|
||||
{
|
||||
public VisualTreeAsset m_InspectorUXML;
|
||||
|
||||
public override VisualElement CreateInspectorGUI()
|
||||
{
|
||||
VisualElement customInspector = new VisualElement();
|
||||
|
||||
if (m_InspectorUXML != null)
|
||||
{
|
||||
VisualElement uxmlContent = m_InspectorUXML.CloneTree();
|
||||
customInspector.Add(uxmlContent);
|
||||
}
|
||||
|
||||
return customInspector;
|
||||
}
|
||||
}
|
||||
12
Assets/Scripts/Editor/MusicController_Inspector.cs.meta
Normal file
12
Assets/Scripts/Editor/MusicController_Inspector.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26704e854716d0c458b3ddc5f1c4d937
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- m_InspectorUXML: {fileID: 9197481963319205126, guid: 6b532ec376f7b2c47911b2066ae8b3bc, type: 3}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -16,3 +16,12 @@ MonoBehaviour:
|
||||
- sound: {fileID: 8300000, guid: fa0b6b9872cd9b84bb24e35b24e57fdf, type: 3}
|
||||
volume: 1
|
||||
pitch: 1
|
||||
- sound: {fileID: 8300000, guid: fa0b6b9872cd9b84bb24e35b24e57fdf, type: 3}
|
||||
volume: 1
|
||||
pitch: 0.9
|
||||
- sound: {fileID: 8300000, guid: fa0b6b9872cd9b84bb24e35b24e57fdf, type: 3}
|
||||
volume: 1
|
||||
pitch: 1.1
|
||||
- sound: {fileID: 8300000, guid: fa0b6b9872cd9b84bb24e35b24e57fdf, type: 3}
|
||||
volume: 1
|
||||
pitch: 1.2
|
||||
|
||||
@ -83,6 +83,7 @@ namespace RR.Common.UI
|
||||
|
||||
void OnModalClosed()
|
||||
{
|
||||
// Восстанавливаем интерактивность всех внешних элементов
|
||||
foreach (var kv in _outsidePrev)
|
||||
{
|
||||
var s = kv.Key;
|
||||
@ -91,12 +92,32 @@ namespace RR.Common.UI
|
||||
_outsidePrev.Clear();
|
||||
_outside.Clear();
|
||||
|
||||
// Возвращаем фокус на элемент, который был выделен до открытия модалки
|
||||
if (EventSystem.current)
|
||||
{
|
||||
GameObject toSelect = null;
|
||||
|
||||
// Проверяем, что предыдущий элемент всё ещё активен и интерактивен
|
||||
if (_prevSelectedGlobal && _prevSelectedGlobal.activeInHierarchy)
|
||||
EventSystem.current.SetSelectedGameObject(_prevSelectedGlobal);
|
||||
else
|
||||
EventSystem.current.SetSelectedGameObject(null);
|
||||
{
|
||||
var selectable = _prevSelectedGlobal.GetComponent<Selectable>();
|
||||
if (selectable && selectable.interactable)
|
||||
{
|
||||
toSelect = _prevSelectedGlobal;
|
||||
}
|
||||
}
|
||||
|
||||
// Если предыдущий элемент недоступен, ищем любой доступный Selectable
|
||||
if (toSelect == null)
|
||||
{
|
||||
var anySelectable = Object.FindAnyObjectByType<Selectable>(FindObjectsInactive.Exclude);
|
||||
if (anySelectable && anySelectable.interactable && !IsUnderModal(anySelectable.transform))
|
||||
{
|
||||
toSelect = anySelectable.gameObject;
|
||||
}
|
||||
}
|
||||
|
||||
EventSystem.current.SetSelectedGameObject(toSelect);
|
||||
}
|
||||
|
||||
_lastModalSelected = null;
|
||||
@ -108,7 +129,6 @@ namespace RR.Common.UI
|
||||
_outside.Clear();
|
||||
_outsidePrev.Clear();
|
||||
|
||||
// ✅ Новый API Unity 6
|
||||
var all = Object.FindObjectsByType<Selectable>(
|
||||
FindObjectsInactive.Include,
|
||||
FindObjectsSortMode.None);
|
||||
|
||||
31528
Assets/_Recovery/0 (1).unity
Normal file
31528
Assets/_Recovery/0 (1).unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/_Recovery/0 (1).unity.meta
Normal file
7
Assets/_Recovery/0 (1).unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da2f28369774eb142a79234b4bd930f7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
31528
Assets/_Recovery/0 (2).unity
Normal file
31528
Assets/_Recovery/0 (2).unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/_Recovery/0 (2).unity.meta
Normal file
7
Assets/_Recovery/0 (2).unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40c4641c39eceef46801d47be81e929b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -3,7 +3,12 @@
|
||||
--- !u!5 &1
|
||||
TimeManager:
|
||||
m_ObjectHideFlags: 0
|
||||
Fixed Timestep: 0.02
|
||||
Maximum Allowed Timestep: 0.33333334
|
||||
serializedVersion: 2
|
||||
Fixed Timestep:
|
||||
m_Count: 2822399
|
||||
m_Rate:
|
||||
m_Denominator: 1
|
||||
m_Numerator: 141120000
|
||||
Maximum Allowed Timestep: 0.03333333
|
||||
m_TimeScale: 1
|
||||
Maximum Particle Timestep: 0.03
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user