Add AudioManager and PlayerAnimationEvents; refactor namespaces to Managers

This commit is contained in:
Данил Ярош 2025-10-23 17:07:23 +03:00
parent 994fbdfd74
commit 4a750d9404
45 changed files with 2941 additions and 382 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@ -0,0 +1,559 @@
fileFormatVersion: 2
guid: 9ce303cd19cea9c44bbcb39bd5806373
TextureImporter:
internalIDToNameTable:
- first:
213: -5793495891355132960
second: Small_Trees_0
- first:
213: -2480663490343731226
second: Small_Trees_1
- first:
213: -1594124580492872985
second: Small_Trees_2
- first:
213: -2240931866738429554
second: Small_Trees_3
- first:
213: -5491636001203759175
second: Small_Trees_4
- first:
213: -1837407052407892004
second: Small_Trees_5
- first:
213: -8135672344382018631
second: Small_Trees_6
- first:
213: 2724955347123243205
second: Small_Trees_7
- first:
213: 151847434039608547
second: Small_Trees_8
- first:
213: 9046612372793395807
second: Small_Trees_9
- first:
213: -5467998332605724774
second: Small_Trees_10
- first:
213: -2276440083340796921
second: Small_Trees_11
- first:
213: 5997232623814366011
second: Small_Trees_12
- first:
213: 152598684326381614
second: Small_Trees_13
- first:
213: -2818281756793187618
second: Small_Trees_14
- first:
213: -4862916849395261480
second: Small_Trees_15
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: Small_Trees_0
rect:
serializedVersion: 2
x: 27
y: 722
width: 276
height: 271
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 0eb971c9e2e599fa0800000000000000
internalID: -5793495891355132960
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1
rect:
serializedVersion: 2
x: 311
y: 722
width: 209
height: 297
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 6eff7cad2b9e29dd0800000000000000
internalID: -2480663490343731226
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_2
rect:
serializedVersion: 2
x: 519
y: 719
width: 225
height: 270
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 7e2f00cd32880e9e0800000000000000
internalID: -1594124580492872985
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_3
rect:
serializedVersion: 2
x: 749
y: 723
width: 245
height: 262
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: e81f335175c96e0e0800000000000000
internalID: -2240931866738429554
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_4
rect:
serializedVersion: 2
x: 32
y: 479
width: 270
height: 234
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 9b7d080272ac9c3b0800000000000000
internalID: -5491636001203759175
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_5
rect:
serializedVersion: 2
x: 319
y: 480
width: 181
height: 233
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: cd71e6555083086e0800000000000000
internalID: -1837407052407892004
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_6
rect:
serializedVersion: 2
x: 501
y: 480
width: 242
height: 233
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 9bbe3208b19481f80800000000000000
internalID: -8135672344382018631
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_7
rect:
serializedVersion: 2
x: 751
y: 479
width: 255
height: 228
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 5c80516637cf0d520800000000000000
internalID: 2724955347123243205
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_8
rect:
serializedVersion: 2
x: 39
y: 247
width: 219
height: 225
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 3e44cfdcf687b1200800000000000000
internalID: 151847434039608547
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_9
rect:
serializedVersion: 2
x: 267
y: 248
width: 231
height: 218
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: f5a0105a5060c8d70800000000000000
internalID: 9046612372793395807
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_10
rect:
serializedVersion: 2
x: 527
y: 251
width: 190
height: 219
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: a978b98bc74cd14b0800000000000000
internalID: -5467998332605724774
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_11
rect:
serializedVersion: 2
x: 735
y: 250
width: 262
height: 220
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 70cd2082ec57860e0800000000000000
internalID: -2276440083340796921
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_12
rect:
serializedVersion: 2
x: 28
y: 31
width: 249
height: 202
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: b33d6d1fb437a3350800000000000000
internalID: 5997232623814366011
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_13
rect:
serializedVersion: 2
x: 276
y: 31
width: 229
height: 210
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: e284774e1b32e1200800000000000000
internalID: 152598684326381614
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_14
rect:
serializedVersion: 2
x: 519
y: 31
width: 204
height: 210
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: ed2d0619ca373e8d0800000000000000
internalID: -2818281756793187618
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_15
rect:
serializedVersion: 2
x: 739
y: 31
width: 254
height: 205
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 8df988be3e2738cb0800000000000000
internalID: -4862916849395261480
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
Small_Trees_0: -5793495891355132960
Small_Trees_1: -2480663490343731226
Small_Trees_10: -5467998332605724774
Small_Trees_11: -2276440083340796921
Small_Trees_12: 5997232623814366011
Small_Trees_13: 152598684326381614
Small_Trees_14: -2818281756793187618
Small_Trees_15: -4862916849395261480
Small_Trees_2: -1594124580492872985
Small_Trees_3: -2240931866738429554
Small_Trees_4: -5491636001203759175
Small_Trees_5: -1837407052407892004
Small_Trees_6: -8135672344382018631
Small_Trees_7: 2724955347123243205
Small_Trees_8: 151847434039608547
Small_Trees_9: 9046612372793395807
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -0,0 +1,561 @@
fileFormatVersion: 2
guid: 797648a5360eb8a47a925251bde2ef33
TextureImporter:
internalIDToNameTable:
- first:
213: -1947806672497376239
second: Small_Trees_1_0
- first:
213: 34409624317915132
second: Small_Trees_1_1
- first:
213: 486843994260169808
second: Small_Trees_1_2
- first:
213: 2828028255526858176
second: Small_Trees_1_3
- first:
213: 2124604078896532210
second: Small_Trees_1_4
- first:
213: 4184536236130239528
second: Small_Trees_1_5
- first:
213: -1465348247671270684
second: Small_Trees_1_6
- first:
213: -5014765252600376534
second: Small_Trees_1_7
- first:
213: 1554080120174084735
second: Small_Trees_1_8
- first:
213: -5445804947714876990
second: Small_Trees_1_9
- first:
213: 6524060784117408553
second: Small_Trees_1_10
- first:
213: 3124282115206948232
second: Small_Trees_1_11
- first:
213: -8718970401207674952
second: Small_Trees_1_12
- first:
213: -8287536898819499336
second: Small_Trees_1_13
- first:
213: 519636550490852067
second: Small_Trees_1_14
- first:
213: 8521588796071565464
second: Small_Trees_1_15
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: Small_Trees_1_0
rect:
serializedVersion: 2
x: 24
y: 736
width: 241
height: 264
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 11488aab62008f4e0800000000000000
internalID: -1947806672497376239
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_1
rect:
serializedVersion: 2
x: 280
y: 736
width: 216
height: 282
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: cffe25afe5f3a7000800000000000000
internalID: 34409624317915132
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_2
rect:
serializedVersion: 2
x: 520
y: 736
width: 223
height: 277
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 054e8ea880e91c600800000000000000
internalID: 486843994260169808
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_3
rect:
serializedVersion: 2
x: 753
y: 730
width: 269
height: 285
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 0cd227107bc2f3720800000000000000
internalID: 2828028255526858176
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_4
rect:
serializedVersion: 2
x: 40
y: 496
width: 216
height: 225
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2fa49f2372c1c7d10800000000000000
internalID: 2124604078896532210
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_5
rect:
serializedVersion: 2
x: 276
y: 496
width: 225
height: 224
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 8240b404985721a30800000000000000
internalID: 4184536236130239528
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_6
rect:
serializedVersion: 2
x: 528
y: 496
width: 208
height: 226
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 4e2105158890aabe0800000000000000
internalID: -1465348247671270684
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_7
rect:
serializedVersion: 2
x: 784
y: 496
width: 168
height: 226
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: a2358c67299f76ab0800000000000000
internalID: -5014765252600376534
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_8
rect:
serializedVersion: 2
x: 54
y: 256
width: 170
height: 223
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: f72097ba2a3319510800000000000000
internalID: 1554080120174084735
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_9
rect:
serializedVersion: 2
x: 261
y: 256
width: 203
height: 232
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2c9d36fc04d9c64b0800000000000000
internalID: -5445804947714876990
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_10
rect:
serializedVersion: 2
x: 507
y: 256
width: 221
height: 224
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 923ef5a97be1a8a50800000000000000
internalID: 6524060784117408553
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_11
rect:
serializedVersion: 2
x: 764
y: 256
width: 257
height: 234
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 8852407d70eab5b20800000000000000
internalID: 3124282115206948232
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_12
rect:
serializedVersion: 2
x: 40
y: 16
width: 198
height: 224
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 8b71fdc7d9efff680800000000000000
internalID: -8718970401207674952
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_13
rect:
serializedVersion: 2
x: 272
y: 16
width: 237
height: 224
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 8badbea8911ccfc80800000000000000
internalID: -8287536898819499336
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_14
rect:
serializedVersion: 2
x: 540
y: 16
width: 148
height: 224
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 3ea015480be163700800000000000000
internalID: 519636550490852067
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Small_Trees_1_15
rect:
serializedVersion: 2
x: 740
y: 1
width: 273
height: 239
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 8985bc75cd3c24670800000000000000
internalID: 8521588796071565464
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 52f9dab2f90957e49b9dcd57ff6dba57
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries:
- key: SpriteEditor.SliceSettings
value: '{"sliceOnImport":false,"gridCellCount":{"x":1.0,"y":1.0},"gridSpriteSize":{"x":64.0,"y":64.0},"gridSpriteOffset":{"x":0.0,"y":0.0},"gridSpritePadding":{"x":0.0,"y":0.0},"pivot":{"x":0.5,"y":0.5},"pivotPixels":{"x":0.0,"y":0.0},"autoSlicingMethod":0,"spriteAlignment":0,"pivotUnitMode":0,"slicingType":0,"keepEmptyRects":false,"isAlternate":false}'
nameFileIdTable:
Small_Trees_1_0: -1947806672497376239
Small_Trees_1_1: 34409624317915132
Small_Trees_1_10: 6524060784117408553
Small_Trees_1_11: 3124282115206948232
Small_Trees_1_12: -8718970401207674952
Small_Trees_1_13: -8287536898819499336
Small_Trees_1_14: 519636550490852067
Small_Trees_1_15: 8521588796071565464
Small_Trees_1_2: 486843994260169808
Small_Trees_1_3: 2828028255526858176
Small_Trees_1_4: 2124604078896532210
Small_Trees_1_5: 4184536236130239528
Small_Trees_1_6: -1465348247671270684
Small_Trees_1_7: -5014765252600376534
Small_Trees_1_8: 1554080120174084735
Small_Trees_1_9: -5445804947714876990
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SFX.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a8f6d4d54b212dd418482ce5eafff65e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SFX/Ambient.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f275684fdcf8bb149b62c6df2a609824
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SFX/Movement.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 57a4f5562e31f8a4ebfd8e305d8e3b39
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 144cba17f4a47274d834d5e1fc28acb9
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:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 5f68c3b1c31c833458e189d0b7d622dd
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:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 4f6a3b9402e60e9469e3b2cf9dd01ff3
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:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: fa0b6b9872cd9b84bb24e35b24e57fdf
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:

8
Assets/SFX/Music.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7c4a4b8979f55b7419ad0f32736401b4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SFX/Player.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 167ab01cf5313904f8c0a289d0925cdc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -33,7 +33,7 @@ namespace RR.Common.Interfaces
}
}
namespace RR.Game2D.Core.Interfaces
namespace RR.Game2D.Core.Managers.Interfaces
{
public interface ILauchable
{

View File

@ -1,9 +1,12 @@
using RR.Common.Managers;
using RR.Game2D.Behaviour;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using UnityEngine;
public class PlayerAnimationEvents : MonoBehaviour
{
[SerializeField] private AudioClip deathSound;
private PlayerController _controller;
private Rigidbody2D _rb;
@ -21,4 +24,11 @@ public class PlayerAnimationEvents : MonoBehaviour
_rb.constraints = RigidbodyConstraints2D.FreezeRotation;
GameManager.Instance.RespawnPlayer();
}
public void PlaySfx(AudioClip sound)
{
// Debug.Log($"StepSound: {stepSound}");
if (sound != null) GameManager.Instance.Audio.PlaySfxAt(sound, transform.position, 0.5f);
// AudioManager.Instance.PlaySfxAt(stepSound, transform.position);
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 5f4612beb3ca33c4b9e2a6a2068977ab
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- deathSound: {instanceID: 0}
- stepSound: {fileID: 8300000, guid: 144cba17f4a47274d834d5e1fc28acb9, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,345 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;
namespace RR.Common.Managers
{
public class AudioManager : MonoBehaviour
{
// ==== Singleton ====
public static AudioManager Instance { get; private set; }
[Header("Music")]
[SerializeField] private AudioSource musicSource; // child: MusicSource
[SerializeField] private AudioSource tempMusicSource; // child: TempMusicSource
[Tooltip("Группа микшера для музыки (необязательно)")]
[SerializeField] private AudioMixerGroup musicMixerGroup;
[Tooltip("Целевой громкость музыки (после фейдов)")]
[Range(0f, 1.5f)] public float musicTargetVolume = 1f;
[Tooltip("Длительность фейда по умолчанию (сек)")]
[SerializeField] private float defaultFadeDuration = 0.8f;
[Header("SFX Pool")]
[SerializeField] private int sfxPoolSize = 8;
[SerializeField] private Transform sfxPoolParent; // child: SFX Pool
[Tooltip("Группа микшера для SFX (необязательно)")]
[SerializeField] private AudioMixerGroup sfxMixerGroup;
[Range(0f, 1.5f)] public float sfxDefaultVolume = 1f;
private readonly List<AudioSource> sfxPool = new List<AudioSource>(64);
private int sfxRoundRobinIndex = 0;
// Внутреннее
private Coroutine musicFadeCoroutine;
private Coroutine crossfadeCoroutine;
private float storedMusicVolumeBeforePause = 1f;
private bool isPausedFaded = false;
#region Unity Lifetime
public void Initialize()
{
// Singleton init
if (Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
DontDestroyOnLoad(gameObject);
EnsureMusicSources();
EnsureSfxPool();
}
//private void Awake()
//{
//}
// Создаёт/находит MusicSource и TempMusicSource
private void EnsureMusicSources()
{
if (musicSource == null)
{
var t = transform.Find("MusicSource");
if (t != null) musicSource = t.GetComponent<AudioSource>();
}
if (tempMusicSource == null)
{
var t = transform.Find("TempMusicSource");
if (t != null) tempMusicSource = t.GetComponent<AudioSource>();
}
if (musicSource == null) musicSource = CreateChildAudioSource("MusicSource", loop: true, output: musicMixerGroup);
if (tempMusicSource == null) tempMusicSource = CreateChildAudioSource("TempMusicSource", loop: true, output: musicMixerGroup);
PrepareMusicSource(musicSource);
PrepareMusicSource(tempMusicSource);
tempMusicSource.volume = 0f; // запасной источник молчит
musicSource.volume = Mathf.Clamp01(musicTargetVolume);
}
private void PrepareMusicSource(AudioSource src)
{
src.playOnAwake = false;
src.loop = true;
src.spatialBlend = 0f; // 2D музыка
if (musicMixerGroup != null) src.outputAudioMixerGroup = musicMixerGroup;
}
private AudioSource CreateChildAudioSource(string childName, bool loop, AudioMixerGroup output)
{
var go = new GameObject(childName);
go.transform.SetParent(transform, false);
var src = go.AddComponent<AudioSource>();
src.loop = loop;
src.playOnAwake = false;
src.spatialBlend = 0f;
if (output != null) src.outputAudioMixerGroup = output;
return src;
}
// Создаёт/находит контейнер и пул SFX источников
private void EnsureSfxPool()
{
if (sfxPoolParent == null)
{
var t = transform.Find("SFX Pool");
if (t != null) sfxPoolParent = t;
}
if (sfxPoolParent == null)
{
var go = new GameObject("SFX Pool");
sfxPoolParent = go.transform;
sfxPoolParent.SetParent(transform, false);
}
// Если уже есть дети-аудиоисточники — используем их как пул.
sfxPool.Clear();
var existing = sfxPoolParent.GetComponentsInChildren<AudioSource>(includeInactive: true);
foreach (var src in existing)
{
SetupSfxSource(src);
sfxPool.Add(src);
}
// Добираем до нужного размера
for (int i = sfxPool.Count; i < sfxPoolSize; i++)
{
var src = CreateSfxSource($"SFX_{i:00}");
sfxPool.Add(src);
}
}
private AudioSource CreateSfxSource(string sourceName)
{
var go = new GameObject(sourceName);
go.transform.SetParent(sfxPoolParent, false);
var src = go.AddComponent<AudioSource>();
SetupSfxSource(src);
return src;
}
private void SetupSfxSource(AudioSource src)
{
src.playOnAwake = false;
src.loop = false;
src.spatialBlend = 0f; // по умолчанию 2D
src.volume = sfxDefaultVolume;
if (sfxMixerGroup != null) src.outputAudioMixerGroup = sfxMixerGroup;
}
#endregion
#region Public API
/// <summary>
/// Мгновенно запустить музыку (без фейда).
/// </summary>
public void PlayMusicImmediate(AudioClip clip, bool loop = true, float targetVolume = -1f)
{
if (clip == null) return;
StopCrossfadeAndFade();
musicSource.clip = clip;
musicSource.loop = loop;
musicSource.volume = (targetVolume >= 0f ? targetVolume : musicTargetVolume);
musicSource.Play();
tempMusicSource.Stop();
tempMusicSource.clip = null;
tempMusicSource.volume = 0f;
}
/// <summary>
/// 2) Плавно сменить музыку (кроссфейд A->B).
/// </summary>
public void CrossfadeMusic(AudioClip newClip, float duration = -1f, bool loop = true, float newTargetVolume = -1f)
{
if (newClip == null) return;
float d = (duration > 0f ? duration : defaultFadeDuration);
float toVol = (newTargetVolume >= 0f ? newTargetVolume : musicTargetVolume);
StopCrossfadeAndFade();
crossfadeCoroutine = StartCoroutine(CrossfadeRoutine(newClip, d, loop, toVol));
}
/// <summary>
/// 1) Плавно приостановить музыку (для паузы).
/// pause=true: плавный фейд к 0 и Pause(). pause=false: UnPause() и плавный фейд к musicTargetVolume.
/// </summary>
public void SmoothPauseMusic(bool pause, float duration = -1f)
{
float d = (duration > 0f ? duration : defaultFadeDuration);
if (pause)
{
if (isPausedFaded) return;
storedMusicVolumeBeforePause = musicSource.volume;
StopCrossfadeAndFade();
musicFadeCoroutine = StartCoroutine(FadeOutThenPause(musicSource, d));
isPausedFaded = true;
}
else
{
if (!isPausedFaded) return;
StopCrossfadeAndFade();
musicSource.UnPause();
musicFadeCoroutine = StartCoroutine(Fade(musicSource, from: 0f, to: Mathf.Clamp01(musicTargetVolume), d));
isPausedFaded = false;
}
}
/// <summary>
/// 3) Воспроизвести SFX из пула (2D).
/// </summary>
public void PlaySfx(AudioClip clip, float volume = 1f, float pitch = 1f)
{
if (clip == null) return;
var src = GetFreeSfxSource();
ConfigureAndPlaySfx(src, clip, volume, pitch, spatialBlend: 0f, position: null);
}
/// <summary>
/// 3) Воспроизвести SFX из пула в мире (3D).
/// </summary>
public void PlaySfxAt(AudioClip clip, Vector3 position, float volume = 1f, float pitch = 1f, float spatialBlend = 1f)
{
if (clip == null) return;
var src = GetFreeSfxSource();
ConfigureAndPlaySfx(src, clip, volume, pitch, Mathf.Clamp01(spatialBlend), position);
}
// ==== Internal helpers ====
private void StopCrossfadeAndFade()
{
if (crossfadeCoroutine != null) { StopCoroutine(crossfadeCoroutine); crossfadeCoroutine = null; }
if (musicFadeCoroutine != null) { StopCoroutine(musicFadeCoroutine); musicFadeCoroutine = null; }
}
private IEnumerator CrossfadeRoutine(AudioClip newClip, float duration, bool loop, float targetVol)
{
// Готовим второй источник
tempMusicSource.clip = newClip;
tempMusicSource.loop = loop;
tempMusicSource.volume = 0f;
tempMusicSource.Play();
float startVolA = musicSource.volume;
float t = 0f;
while (t < duration)
{
t += Time.unscaledDeltaTime; // не зависим от timescale (музыка при паузе всё равно может фейдиться)
float k = Mathf.Clamp01(t / duration);
// кроссфейд
musicSource.volume = Mathf.Lerp(startVolA, 0f, k);
tempMusicSource.volume = Mathf.Lerp(0f, targetVol, k);
yield return null;
}
// Завершение: стопим A, меняем роли (чтобы основной всегда указывал на текущую музыку)
musicSource.Stop();
musicSource.clip = null;
musicSource.volume = targetVol;
// Меняем ссылки местами
(musicSource, tempMusicSource) = (tempMusicSource, musicSource);
// Убедимся, что запасной источник молчит
tempMusicSource.volume = 0f;
tempMusicSource.Stop();
tempMusicSource.clip = null;
crossfadeCoroutine = null;
}
private IEnumerator FadeOutThenPause(AudioSource src, float duration)
{
float startVol = src.volume;
yield return Fade(src, startVol, 0f, duration);
src.Pause();
musicFadeCoroutine = null;
}
private IEnumerator Fade(AudioSource src, float from, float to, float duration)
{
float t = 0f;
src.volume = from;
if (!src.isPlaying) src.Play();
while (t < duration)
{
t += Time.unscaledDeltaTime;
float k = Mathf.Clamp01(t / duration);
src.volume = Mathf.Lerp(from, to, k);
yield return null;
}
src.volume = to;
}
private AudioSource GetFreeSfxSource()
{
// Сначала ищем свободный
for (int i = 0; i < sfxPool.Count; i++)
{
int idx = (sfxRoundRobinIndex + i) % sfxPool.Count;
if (!sfxPool[idx].isPlaying)
{
sfxRoundRobinIndex = (idx + 1) % sfxPool.Count;
return sfxPool[idx];
}
}
// Если все заняты — берём по round-robin (steal)
var src = sfxPool[sfxRoundRobinIndex];
sfxRoundRobinIndex = (sfxRoundRobinIndex + 1) % sfxPool.Count;
return src;
}
private void ConfigureAndPlaySfx(AudioSource src, AudioClip clip, float volume, float pitch, float spatialBlend, Vector3? position)
{
src.clip = clip;
src.volume = Mathf.Clamp(volume * sfxDefaultVolume, 0f, 1.5f);
src.pitch = Mathf.Clamp(pitch, -3f, 3f);
src.spatialBlend = spatialBlend;
if (position.HasValue)
{
src.transform.position = position.Value;
src.rolloffMode = AudioRolloffMode.Linear;
src.minDistance = 1f;
src.maxDistance = 20f;
}
src.Play();
}
#endregion
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: cb75bd24cab94554aa1537b5ba10e41c

View File

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 5f4612beb3ca33c4b9e2a6a2068977ab

View File

@ -1,7 +1,7 @@
using System.Collections;
using UnityEngine;
namespace RR.Game2D.Core
namespace RR.Game2D.Core.Managers
{
public class CameraFollow : MonoBehaviour
{

View File

@ -1,4 +1,4 @@
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using Unity.Cinemachine;
using UnityEngine;

View File

@ -1,7 +1,7 @@
using UnityEngine;
using RR.Common.Interfaces;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using RR.Game2D.Behaviour.ScriptableObjects;
namespace RR.Game2D.Behaviour

View File

@ -2,7 +2,7 @@
using UnityEngine.InputSystem;
using RR.Common.Interfaces;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
namespace RR.Game2D.Behaviour
{

View File

@ -1,5 +1,5 @@
using System.Collections.Generic;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;

View File

@ -1,6 +1,6 @@
using UnityEngine;
namespace RR.Game2D.Core
namespace RR.Game2D.Core.Managers
{
public class Parallax : MonoBehaviour
{

View File

@ -1,6 +1,6 @@
using System;
using RR.Game2D.Behaviour;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using UnityEngine;
namespace RR.Game2D.Entities.Hazards

View File

@ -1,5 +1,5 @@
using RR.Game2D.Behaviour;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using UnityEngine;
using UnityEngine.VFX;

View File

@ -3,15 +3,20 @@ using System.IO;
using UnityEngine;
using UnityEngine.SceneManagement;
using RR.Common.Managers;
using RR.Game2D.Behaviour;
using RR.Game2D.Entities;
namespace RR.Game2D.Core
namespace RR.Game2D.Core.Managers
{
[DefaultExecutionOrder(-1000)]
public class GameManager : MonoBehaviour
{
// Singleton instance
public static GameManager Instance { get; private set; }
// AudioManager instance
public AudioManager Audio {get; private set;}
[Header("Пауза")]
public bool IsPaused { get; private set; }
@ -66,6 +71,12 @@ namespace RR.Game2D.Core
Instance = this;
DontDestroyOnLoad(gameObject);
if (Audio == null)
{
Audio = gameObject.AddComponent<AudioManager>();
Audio.Initialize();
}
if (SceneManager.GetActiveScene().name != "MainMenu") _shouldSpawnPlayer = true;
}

View File

@ -1,5 +1,5 @@
using UnityEngine;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using RR.Game2D.Behaviour;
namespace RR.Game2D.Entities.Projectiles

View File

@ -1,8 +1,8 @@
using UnityEngine;
using RR.Common.Interfaces;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using RR.Game2D.Behaviour;
using RR.Game2D.Core.Interfaces;
using RR.Game2D.Core.Managers.Interfaces;
namespace RR.Game2D.Entities.Projectiles
{

View File

@ -1,6 +1,6 @@
using System.Collections;
using UnityEngine;
using RR.Game2D.Core.Interfaces;
using RR.Game2D.Core.Managers.Interfaces;
namespace RR.Game2D.Entities.Projectiles
{

View File

@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
namespace RR.Common.UI
{

View File

@ -1,6 +1,6 @@
using UnityEngine;
using UnityEngine.UI;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
namespace RR.Common.UI
{

View File

@ -2,7 +2,7 @@
using UnityEngine.UI;
using System.Collections;
using UnityEngine.InputSystem;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
namespace RR.Common.UI
{

View File

@ -1,6 +1,6 @@
using TMPro;
using UnityEngine;
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
namespace RR.Common.UI
{

View File

@ -1,4 +1,4 @@
using RR.Game2D.Core;
using RR.Game2D.Core.Managers;
using UnityEngine;
public class DebugSettings : MonoBehaviour