This commit is contained in:
2026-08-12 18:18:55 +08:00
parent 4124c84965
commit 83c6efcbef
26 changed files with 43028 additions and 37394 deletions
@@ -1,11 +1,9 @@
fileFormatVersion: 2
guid: 28f9615fd1fb18c46818638b7bc48d5b
timeCreated: 1766415474
licenseType: Free
TextureImporter:
serializedVersion: 11
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
@@ -22,9 +20,12 @@ TextureImporter:
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
@@ -56,10 +57,15 @@ TextureImporter:
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
@@ -71,42 +77,407 @@ TextureImporter:
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
sprites:
- serializedVersion: 2
name: Game174_ScoreFont2_0
rect:
serializedVersion: 2
x: 210
y: 208
width: 45
height: 48
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: b1ae7e4454c5ce0ed64de3d4cf0198c5
internalID: -6307453850634557355
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_1
rect:
serializedVersion: 2
x: 210
y: 171
width: 21
height: 36
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 70cf307b0a305bfd1f8347ec825a7258
internalID: 255055898594868467
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_2
rect:
serializedVersion: 2
x: 153
y: 94
width: 40
height: 25
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 0f391ce15d07857bff61e6f3e8084952
internalID: 1941265616215994174
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_3
rect:
serializedVersion: 2
x: 231
y: 182
width: 18
height: 25
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 710e0ee87a62fecc956ec5fc69bd056d
internalID: -1664785848833685743
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_4
rect:
serializedVersion: 2
x: 0
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 4de852cc28301799878aa45d4bf8e6cd
internalID: 7494402094960056575
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_5
rect:
serializedVersion: 2
x: 53
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2fb5f32f67844775b46001c67d72b355
internalID: -7764216637275979185
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_6
rect:
serializedVersion: 2
x: 106
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 081764056322514fc000e91fb73ba0c3
internalID: 6062557371402831831
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_7
rect:
serializedVersion: 2
x: 159
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 866a7f056419e714c9efc9b58e38e928
internalID: -8190789727159053790
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_8
rect:
serializedVersion: 2
x: 0
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: c551c71279d86b900dbb6292781701b1
internalID: 3359070621352073583
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_9
rect:
serializedVersion: 2
x: 53
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: be26ac6d4940055274d2a686d57ee315
internalID: -3467266090763729017
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_10
rect:
serializedVersion: 2
x: 106
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: b6e62b5fb15079a8948473e236f36a70
internalID: -1285831063886895113
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_11
rect:
serializedVersion: 2
x: 159
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 17788092c231ec540ddecd6d0e009dbe
internalID: -7217492258537322258
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_12
rect:
serializedVersion: 2
x: 0
y: 48
width: 50
height: 69
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 24bfbc6033d54e23b05234448e41f8ec
internalID: 6655431567444343491
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_13
rect:
serializedVersion: 2
x: 53
y: 48
width: 50
height: 69
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: c3983f193668393714273c993ec5102e
internalID: 7433712399153153224
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont2_14
rect:
serializedVersion: 2
x: 105
y: 62
width: 48
height: 57
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 4c744e1360d1a13b8d4c98639d475e6b
internalID: -828547608270166401
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID:
internalID: 0
vertices: []
indices:
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
output:
textureImportInstructions:
compressedFormat: 0
uncompressedFormat: 0
desiredFormat: 0
usageMode: 0
colorSpace: 1
androidETC2FallbackFormat: 0
width: 0
height: 0
compressionQuality: 0
androidETC2FallbackDownscale: 0
sourceTextureInformation:
width: 0
height: 0
doesTextureContainAlpha: 0
sourceWasHDR: 0
importInspectorWarnings:
nameFileIdTable:
Game174_ScoreFont2_0: -6307453850634557355
Game174_ScoreFont2_1: 255055898594868467
Game174_ScoreFont2_10: -1285831063886895113
Game174_ScoreFont2_11: -7217492258537322258
Game174_ScoreFont2_12: 6655431567444343491
Game174_ScoreFont2_13: 7433712399153153224
Game174_ScoreFont2_14: -828547608270166401
Game174_ScoreFont2_2: 1941265616215994174
Game174_ScoreFont2_3: -1664785848833685743
Game174_ScoreFont2_4: 7494402094960056575
Game174_ScoreFont2_5: -7764216637275979185
Game174_ScoreFont2_6: 6062557371402831831
Game174_ScoreFont2_7: -8190789727159053790
Game174_ScoreFont2_8: 3359070621352073583
Game174_ScoreFont2_9: -3467266090763729017
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: pw_font
assetBundleVariant:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,430 @@
%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: 84a92b25f83d49b9bc132d206b370281, type: 3}
m_Name: Game174_ScoreFont2_SpriteAsset
m_EditorClassIdentifier:
hashCode: 0
material: {fileID: 5690139403094846501}
materialHashCode: 0
m_Version: 1.1.0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName:
m_StyleName:
m_PointSize: 0
m_Scale: 0
m_UnitsPerEM: 0
m_LineHeight: 0
m_AscentLine: 0
m_CapLine: 0
m_MeanLine: 0
m_Baseline: 0
m_DescentLine: 0
m_SuperscriptOffset: 0
m_SuperscriptSize: 0
m_SubscriptOffset: 0
m_SubscriptSize: 0
m_UnderlineOffset: 0
m_UnderlineThickness: 0
m_StrikethroughOffset: 0
m_StrikethroughThickness: 0
m_TabWidth: 0
spriteSheet: {fileID: 2800000, guid: 28f9615fd1fb18c46818638b7bc48d5b, type: 3}
m_SpriteCharacterTable:
- m_ElementType: 2
m_Unicode: 43
m_GlyphIndex: 0
m_Scale: 1
m_Name: plus
m_HashCode: 3936122
- m_ElementType: 2
m_Unicode: 44
m_GlyphIndex: 1
m_Scale: 1
m_Name: comma
m_HashCode: 116599789
- m_ElementType: 2
m_Unicode: 45
m_GlyphIndex: 2
m_Scale: 1
m_Name: minus
m_HashCode: 132293612
- m_ElementType: 2
m_Unicode: 46
m_GlyphIndex: 3
m_Scale: 1
m_Name: dot
m_HashCode: 105887
- m_ElementType: 2
m_Unicode: 48
m_GlyphIndex: 4
m_Scale: 1
m_Name: 0
m_HashCode: 48
- m_ElementType: 2
m_Unicode: 49
m_GlyphIndex: 5
m_Scale: 1
m_Name: 1
m_HashCode: 49
- m_ElementType: 2
m_Unicode: 50
m_GlyphIndex: 6
m_Scale: 1
m_Name: 2
m_HashCode: 50
- m_ElementType: 2
m_Unicode: 51
m_GlyphIndex: 7
m_Scale: 1
m_Name: 3
m_HashCode: 51
- m_ElementType: 2
m_Unicode: 52
m_GlyphIndex: 8
m_Scale: 1
m_Name: 4
m_HashCode: 52
- m_ElementType: 2
m_Unicode: 53
m_GlyphIndex: 9
m_Scale: 1
m_Name: 5
m_HashCode: 53
- m_ElementType: 2
m_Unicode: 54
m_GlyphIndex: 10
m_Scale: 1
m_Name: 6
m_HashCode: 54
- m_ElementType: 2
m_Unicode: 55
m_GlyphIndex: 11
m_Scale: 1
m_Name: 7
m_HashCode: 55
- m_ElementType: 2
m_Unicode: 56
m_GlyphIndex: 12
m_Scale: 1
m_Name: 8
m_HashCode: 56
- m_ElementType: 2
m_Unicode: 57
m_GlyphIndex: 13
m_Scale: 1
m_Name: 9
m_HashCode: 57
- m_ElementType: 2
m_Unicode: 120
m_GlyphIndex: 14
m_Scale: 1
m_Name: x
m_HashCode: 120
m_SpriteGlyphTable:
- m_Index: 0
m_Metrics:
m_Width: 45
m_Height: 48
m_HorizontalBearingX: -22.5
m_HorizontalBearingY: 24
m_HorizontalAdvance: 45
m_GlyphRect:
m_X: 210
m_Y: 208
m_Width: 45
m_Height: 48
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -6307453850634557355, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 1
m_Metrics:
m_Width: 21
m_Height: 36
m_HorizontalBearingX: -10.5
m_HorizontalBearingY: 18
m_HorizontalAdvance: 21
m_GlyphRect:
m_X: 210
m_Y: 171
m_Width: 21
m_Height: 36
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 255055898594868467, guid: 28f9615fd1fb18c46818638b7bc48d5b, type: 3}
- m_Index: 2
m_Metrics:
m_Width: 40
m_Height: 25
m_HorizontalBearingX: -20
m_HorizontalBearingY: 12.5
m_HorizontalAdvance: 40
m_GlyphRect:
m_X: 153
m_Y: 94
m_Width: 40
m_Height: 25
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 1941265616215994174, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 3
m_Metrics:
m_Width: 18
m_Height: 25
m_HorizontalBearingX: -9
m_HorizontalBearingY: 12.5
m_HorizontalAdvance: 18
m_GlyphRect:
m_X: 231
m_Y: 182
m_Width: 18
m_Height: 25
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -1664785848833685743, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 4
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 0
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 7494402094960056575, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 5
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 53
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -7764216637275979185, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 6
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 106
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 6062557371402831831, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 7
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 159
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -8190789727159053790, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 8
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 0
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 3359070621352073583, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 9
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 53
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -3467266090763729017, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 10
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 106
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -1285831063886895113, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 11
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 159
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -7217492258537322258, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 12
m_Metrics:
m_Width: 50
m_Height: 69
m_HorizontalBearingX: -25
m_HorizontalBearingY: 34.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 0
m_Y: 48
m_Width: 50
m_Height: 69
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 6655431567444343491, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 13
m_Metrics:
m_Width: 50
m_Height: 69
m_HorizontalBearingX: -25
m_HorizontalBearingY: 34.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 53
m_Y: 48
m_Width: 50
m_Height: 69
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 7433712399153153224, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
- m_Index: 14
m_Metrics:
m_Width: 48
m_Height: 57
m_HorizontalBearingX: -24
m_HorizontalBearingY: 28.5
m_HorizontalAdvance: 48
m_GlyphRect:
m_X: 105
m_Y: 62
m_Width: 48
m_Height: 57
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -828547608270166401, guid: 28f9615fd1fb18c46818638b7bc48d5b,
type: 3}
spriteInfoList: []
fallbackSpriteAssets: []
--- !u!21 &5690139403094846501
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TextMeshPro/Sprite
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 28f9615fd1fb18c46818638b7bc48d5b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _CullMode: 0
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f944a3bf48b7e9744b4793bbb8559a32
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,11 +1,9 @@
fileFormatVersion: 2
guid: 8b3110dc865c1ce4f81f02404e645b38
timeCreated: 1766415474
licenseType: Free
TextureImporter:
serializedVersion: 11
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
@@ -22,9 +20,12 @@ TextureImporter:
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
@@ -56,10 +57,15 @@ TextureImporter:
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
@@ -71,42 +77,407 @@ TextureImporter:
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
sprites:
- serializedVersion: 2
name: Game174_ScoreFont3_0
rect:
serializedVersion: 2
x: 210
y: 208
width: 45
height: 48
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 07ea989b8bb4820946bb36bf60bff67d
internalID: 5771957878783310761
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_1
rect:
serializedVersion: 2
x: 210
y: 171
width: 21
height: 36
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 02078cd0ad80d37d59809694ce654041
internalID: 2433218805849550810
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_2
rect:
serializedVersion: 2
x: 153
y: 94
width: 40
height: 25
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: f806c7c1aa2b84226fa6e85793ec882e
internalID: -8345638924767506609
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_3
rect:
serializedVersion: 2
x: 231
y: 182
width: 18
height: 25
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: b7e924efa5a8c72dc8230aa4705066b2
internalID: 3403085806512762799
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_4
rect:
serializedVersion: 2
x: 0
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 858e88a63bc49f990538185ce768dc48
internalID: 8837245975983379977
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_5
rect:
serializedVersion: 2
x: 53
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 081b8f27deac2a531798c1e8170fc93f
internalID: -221521229875802991
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_6
rect:
serializedVersion: 2
x: 106
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: dd23fdb2ca9394ba8f0a5b0658b47a83
internalID: 1102185926413277237
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_7
rect:
serializedVersion: 2
x: 159
y: 189
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 986a725b8d831e7499f751db68c6724e
internalID: -4902368105234993085
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_8
rect:
serializedVersion: 2
x: 0
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 127646565580c1c1f4c7195ec32eb5fd
internalID: 4706994667508384885
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_9
rect:
serializedVersion: 2
x: 53
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: fba41444107c7eba9e81d7110437fb71
internalID: 5267033569052362984
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_10
rect:
serializedVersion: 2
x: 106
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 00354e1fa5354295e70446527904a9e2
internalID: 2244512555225261521
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_11
rect:
serializedVersion: 2
x: 159
y: 120
width: 50
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2bb71001cb913e0408df1c2521e0c9b0
internalID: -7154904910601791151
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_12
rect:
serializedVersion: 2
x: 0
y: 48
width: 50
height: 69
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2c9c2750a2c69eafc4008dddc27fc2e6
internalID: 6937736800378755022
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_13
rect:
serializedVersion: 2
x: 53
y: 48
width: 50
height: 69
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: b10e7011ccc92fc05f31aba4d1eea20f
internalID: -4253914627174196214
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Game174_ScoreFont3_14
rect:
serializedVersion: 2
x: 105
y: 62
width: 48
height: 57
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 70d63f53d63574668ceb530acc67d088
internalID: 3620050267520742755
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID:
internalID: 0
vertices: []
indices:
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
output:
textureImportInstructions:
compressedFormat: 0
uncompressedFormat: 0
desiredFormat: 0
usageMode: 0
colorSpace: 1
androidETC2FallbackFormat: 0
width: 0
height: 0
compressionQuality: 0
androidETC2FallbackDownscale: 0
sourceTextureInformation:
width: 0
height: 0
doesTextureContainAlpha: 0
sourceWasHDR: 0
importInspectorWarnings:
nameFileIdTable:
Game174_ScoreFont3_0: 5771957878783310761
Game174_ScoreFont3_1: 2433218805849550810
Game174_ScoreFont3_10: 2244512555225261521
Game174_ScoreFont3_11: -7154904910601791151
Game174_ScoreFont3_12: 6937736800378755022
Game174_ScoreFont3_13: -4253914627174196214
Game174_ScoreFont3_14: 3620050267520742755
Game174_ScoreFont3_2: -8345638924767506609
Game174_ScoreFont3_3: 3403085806512762799
Game174_ScoreFont3_4: 8837245975983379977
Game174_ScoreFont3_5: -221521229875802991
Game174_ScoreFont3_6: 1102185926413277237
Game174_ScoreFont3_7: -4902368105234993085
Game174_ScoreFont3_8: 4706994667508384885
Game174_ScoreFont3_9: 5267033569052362984
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: pw_font
assetBundleVariant:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,431 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &-6036370215965020489
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TextMeshPro/Sprite
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8b3110dc865c1ce4f81f02404e645b38, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _CullMode: 0
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
--- !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: 84a92b25f83d49b9bc132d206b370281, type: 3}
m_Name: Game174_ScoreFont3_SpriteAsset
m_EditorClassIdentifier:
hashCode: 0
material: {fileID: -6036370215965020489}
materialHashCode: 0
m_Version: 1.1.0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName:
m_StyleName:
m_PointSize: 0
m_Scale: 0
m_UnitsPerEM: 0
m_LineHeight: 0
m_AscentLine: 0
m_CapLine: 0
m_MeanLine: 0
m_Baseline: 0
m_DescentLine: 0
m_SuperscriptOffset: 0
m_SuperscriptSize: 0
m_SubscriptOffset: 0
m_SubscriptSize: 0
m_UnderlineOffset: 0
m_UnderlineThickness: 0
m_StrikethroughOffset: 0
m_StrikethroughThickness: 0
m_TabWidth: 0
spriteSheet: {fileID: 2800000, guid: 8b3110dc865c1ce4f81f02404e645b38, type: 3}
m_SpriteCharacterTable:
- m_ElementType: 2
m_Unicode: 43
m_GlyphIndex: 0
m_Scale: 1
m_Name: plus
m_HashCode: 3936122
- m_ElementType: 2
m_Unicode: 44
m_GlyphIndex: 1
m_Scale: 1
m_Name: comma
m_HashCode: 116599789
- m_ElementType: 2
m_Unicode: 45
m_GlyphIndex: 2
m_Scale: 1
m_Name: minus
m_HashCode: 132293612
- m_ElementType: 2
m_Unicode: 46
m_GlyphIndex: 3
m_Scale: 1
m_Name: dot
m_HashCode: 105887
- m_ElementType: 2
m_Unicode: 48
m_GlyphIndex: 4
m_Scale: 1
m_Name: 0
m_HashCode: 48
- m_ElementType: 2
m_Unicode: 49
m_GlyphIndex: 5
m_Scale: 1
m_Name: 1
m_HashCode: 49
- m_ElementType: 2
m_Unicode: 50
m_GlyphIndex: 6
m_Scale: 1
m_Name: 2
m_HashCode: 50
- m_ElementType: 2
m_Unicode: 51
m_GlyphIndex: 7
m_Scale: 1
m_Name: 3
m_HashCode: 51
- m_ElementType: 2
m_Unicode: 52
m_GlyphIndex: 8
m_Scale: 1
m_Name: 4
m_HashCode: 52
- m_ElementType: 2
m_Unicode: 53
m_GlyphIndex: 9
m_Scale: 1
m_Name: 5
m_HashCode: 53
- m_ElementType: 2
m_Unicode: 54
m_GlyphIndex: 10
m_Scale: 1
m_Name: 6
m_HashCode: 54
- m_ElementType: 2
m_Unicode: 55
m_GlyphIndex: 11
m_Scale: 1
m_Name: 7
m_HashCode: 55
- m_ElementType: 2
m_Unicode: 56
m_GlyphIndex: 12
m_Scale: 1
m_Name: 8
m_HashCode: 56
- m_ElementType: 2
m_Unicode: 57
m_GlyphIndex: 13
m_Scale: 1
m_Name: 9
m_HashCode: 57
- m_ElementType: 2
m_Unicode: 120
m_GlyphIndex: 14
m_Scale: 1
m_Name: x
m_HashCode: 120
m_SpriteGlyphTable:
- m_Index: 0
m_Metrics:
m_Width: 45
m_Height: 48
m_HorizontalBearingX: -22.5
m_HorizontalBearingY: 24
m_HorizontalAdvance: 45
m_GlyphRect:
m_X: 210
m_Y: 208
m_Width: 45
m_Height: 48
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 5771957878783310761, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 1
m_Metrics:
m_Width: 21
m_Height: 36
m_HorizontalBearingX: -10.5
m_HorizontalBearingY: 18
m_HorizontalAdvance: 21
m_GlyphRect:
m_X: 210
m_Y: 171
m_Width: 21
m_Height: 36
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 2433218805849550810, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 2
m_Metrics:
m_Width: 40
m_Height: 25
m_HorizontalBearingX: -20
m_HorizontalBearingY: 12.5
m_HorizontalAdvance: 40
m_GlyphRect:
m_X: 153
m_Y: 94
m_Width: 40
m_Height: 25
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -8345638924767506609, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 3
m_Metrics:
m_Width: 18
m_Height: 25
m_HorizontalBearingX: -9
m_HorizontalBearingY: 12.5
m_HorizontalAdvance: 18
m_GlyphRect:
m_X: 231
m_Y: 182
m_Width: 18
m_Height: 25
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 3403085806512762799, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 4
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 0
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 8837245975983379977, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 5
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 53
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -221521229875802991, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 6
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 106
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 1102185926413277237, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 7
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 159
m_Y: 189
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -4902368105234993085, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 8
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 0
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 4706994667508384885, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 9
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 53
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 5267033569052362984, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 10
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 106
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 2244512555225261521, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 11
m_Metrics:
m_Width: 50
m_Height: 67
m_HorizontalBearingX: -25
m_HorizontalBearingY: 33.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 159
m_Y: 120
m_Width: 50
m_Height: 67
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -7154904910601791151, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 12
m_Metrics:
m_Width: 50
m_Height: 69
m_HorizontalBearingX: -25
m_HorizontalBearingY: 34.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 0
m_Y: 48
m_Width: 50
m_Height: 69
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 6937736800378755022, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 13
m_Metrics:
m_Width: 50
m_Height: 69
m_HorizontalBearingX: -25
m_HorizontalBearingY: 34.5
m_HorizontalAdvance: 50
m_GlyphRect:
m_X: 53
m_Y: 48
m_Width: 50
m_Height: 69
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -4253914627174196214, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
- m_Index: 14
m_Metrics:
m_Width: 48
m_Height: 57
m_HorizontalBearingX: -24
m_HorizontalBearingY: 28.5
m_HorizontalAdvance: 48
m_GlyphRect:
m_X: 105
m_Y: 62
m_Width: 48
m_Height: 57
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 3620050267520742755, guid: 8b3110dc865c1ce4f81f02404e645b38,
type: 3}
spriteInfoList: []
fallbackSpriteAssets: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 065376eeb2cfbc44fbf3dba5def6c039
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,11 +1,9 @@
fileFormatVersion: 2
guid: 6d52be7e63fdb714d8382335d2571cd3
timeCreated: 1766415474
licenseType: Free
TextureImporter:
serializedVersion: 11
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
@@ -22,9 +20,12 @@ TextureImporter:
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
@@ -56,10 +57,15 @@ TextureImporter:
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
@@ -71,42 +77,297 @@ TextureImporter:
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
sprites:
- serializedVersion: 2
name: PW_BlueNumFont_0
rect:
serializedVersion: 2
x: 0
y: 97
width: 26
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 69fa639de8eeddd06876f78b0304bc67
internalID: -4105064376901570785
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_1
rect:
serializedVersion: 2
x: 31
y: 97
width: 18
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 580debaec3a523f76448e75590d3ce84
internalID: -5885363025797330952
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_2
rect:
serializedVersion: 2
x: 53
y: 97
width: 28
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: bf9ec6d2265773a807c83cb5357f1031
internalID: -7553995710246344893
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_3
rect:
serializedVersion: 2
x: 81
y: 97
width: 26
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 9ca71e314608daf0e4210a532f003fcb
internalID: 5445800524360384226
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_4
rect:
serializedVersion: 2
x: 107
y: 97
width: 28
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 93263e5e45d521da68b40e42fd455480
internalID: -2398849560840081028
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_5
rect:
serializedVersion: 2
x: 135
y: 97
width: 27
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: a297790014763b364ebbec9672168730
internalID: 4716771869126231112
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_6
rect:
serializedVersion: 2
x: 162
y: 97
width: 27
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 959f615cebdcc49a6de212abd6f7cad9
internalID: -2543469954913430549
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_7
rect:
serializedVersion: 2
x: 189
y: 97
width: 24
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2c1d1d8e06598d85fa134e0a567a08b4
internalID: 790340952439386934
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_8
rect:
serializedVersion: 2
x: 215
y: 97
width: 28
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 253dc4e90ac638b386cb881aae28181f
internalID: 8248958779087997004
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_BlueNumFont_9
rect:
serializedVersion: 2
x: 0
y: 65
width: 25
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: cae2c85ba9b4cf221c6a08dbda801220
internalID: 3762289846761520900
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID:
internalID: 0
vertices: []
indices:
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
output:
textureImportInstructions:
compressedFormat: 0
uncompressedFormat: 0
desiredFormat: 0
usageMode: 0
colorSpace: 1
androidETC2FallbackFormat: 0
width: 0
height: 0
compressionQuality: 0
androidETC2FallbackDownscale: 0
sourceTextureInformation:
width: 0
height: 0
doesTextureContainAlpha: 0
sourceWasHDR: 0
importInspectorWarnings:
nameFileIdTable:
PW_BlueNumFont_0: -4105064376901570785
PW_BlueNumFont_1: -5885363025797330952
PW_BlueNumFont_2: -7553995710246344893
PW_BlueNumFont_3: 5445800524360384226
PW_BlueNumFont_4: -2398849560840081028
PW_BlueNumFont_5: 4716771869126231112
PW_BlueNumFont_6: -2543469954913430549
PW_BlueNumFont_7: 790340952439386934
PW_BlueNumFont_8: 8248958779087997004
PW_BlueNumFont_9: 3762289846761520900
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: pw_font
assetBundleVariant:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,315 @@
%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: 84a92b25f83d49b9bc132d206b370281, type: 3}
m_Name: PW_BlueNumFont_SpriteAsset
m_EditorClassIdentifier:
hashCode: 0
material: {fileID: 5486996799770408029}
materialHashCode: 0
m_Version: 1.1.0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName:
m_StyleName:
m_PointSize: 0
m_Scale: 0
m_UnitsPerEM: 0
m_LineHeight: 0
m_AscentLine: 0
m_CapLine: 0
m_MeanLine: 0
m_Baseline: 0
m_DescentLine: 0
m_SuperscriptOffset: 0
m_SuperscriptSize: 0
m_SubscriptOffset: 0
m_SubscriptSize: 0
m_UnderlineOffset: 0
m_UnderlineThickness: 0
m_StrikethroughOffset: 0
m_StrikethroughThickness: 0
m_TabWidth: 0
spriteSheet: {fileID: 2800000, guid: 6d52be7e63fdb714d8382335d2571cd3, type: 3}
m_SpriteCharacterTable:
- m_ElementType: 2
m_Unicode: 48
m_GlyphIndex: 0
m_Scale: 1
m_Name: 0
m_HashCode: 48
- m_ElementType: 2
m_Unicode: 49
m_GlyphIndex: 1
m_Scale: 1
m_Name: 1
m_HashCode: 49
- m_ElementType: 2
m_Unicode: 50
m_GlyphIndex: 2
m_Scale: 1
m_Name: 2
m_HashCode: 50
- m_ElementType: 2
m_Unicode: 51
m_GlyphIndex: 3
m_Scale: 1
m_Name: 3
m_HashCode: 51
- m_ElementType: 2
m_Unicode: 52
m_GlyphIndex: 4
m_Scale: 1
m_Name: 4
m_HashCode: 52
- m_ElementType: 2
m_Unicode: 53
m_GlyphIndex: 5
m_Scale: 1
m_Name: 5
m_HashCode: 53
- m_ElementType: 2
m_Unicode: 54
m_GlyphIndex: 6
m_Scale: 1
m_Name: 6
m_HashCode: 54
- m_ElementType: 2
m_Unicode: 55
m_GlyphIndex: 7
m_Scale: 1
m_Name: 7
m_HashCode: 55
- m_ElementType: 2
m_Unicode: 56
m_GlyphIndex: 8
m_Scale: 1
m_Name: 8
m_HashCode: 56
- m_ElementType: 2
m_Unicode: 57
m_GlyphIndex: 9
m_Scale: 1
m_Name: 9
m_HashCode: 57
m_SpriteGlyphTable:
- m_Index: 0
m_Metrics:
m_Width: 26
m_Height: 31
m_HorizontalBearingX: -13
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 26
m_GlyphRect:
m_X: 0
m_Y: 97
m_Width: 26
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -4105064376901570785, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 1
m_Metrics:
m_Width: 18
m_Height: 31
m_HorizontalBearingX: -9
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 18
m_GlyphRect:
m_X: 31
m_Y: 97
m_Width: 18
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -5885363025797330952, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 2
m_Metrics:
m_Width: 28
m_Height: 31
m_HorizontalBearingX: -14
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 28
m_GlyphRect:
m_X: 53
m_Y: 97
m_Width: 28
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -7553995710246344893, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 3
m_Metrics:
m_Width: 26
m_Height: 31
m_HorizontalBearingX: -13
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 26
m_GlyphRect:
m_X: 81
m_Y: 97
m_Width: 26
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 5445800524360384226, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 4
m_Metrics:
m_Width: 28
m_Height: 31
m_HorizontalBearingX: -14
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 28
m_GlyphRect:
m_X: 107
m_Y: 97
m_Width: 28
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -2398849560840081028, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 5
m_Metrics:
m_Width: 27
m_Height: 31
m_HorizontalBearingX: -13.5
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 27
m_GlyphRect:
m_X: 135
m_Y: 97
m_Width: 27
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 4716771869126231112, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 6
m_Metrics:
m_Width: 27
m_Height: 31
m_HorizontalBearingX: -13.5
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 27
m_GlyphRect:
m_X: 162
m_Y: 97
m_Width: 27
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -2543469954913430549, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 7
m_Metrics:
m_Width: 24
m_Height: 31
m_HorizontalBearingX: -12
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 24
m_GlyphRect:
m_X: 189
m_Y: 97
m_Width: 24
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 790340952439386934, guid: 6d52be7e63fdb714d8382335d2571cd3, type: 3}
- m_Index: 8
m_Metrics:
m_Width: 28
m_Height: 31
m_HorizontalBearingX: -14
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 28
m_GlyphRect:
m_X: 215
m_Y: 97
m_Width: 28
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 8248958779087997004, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
- m_Index: 9
m_Metrics:
m_Width: 25
m_Height: 31
m_HorizontalBearingX: -12.5
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 25
m_GlyphRect:
m_X: 0
m_Y: 65
m_Width: 25
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 3762289846761520900, guid: 6d52be7e63fdb714d8382335d2571cd3,
type: 3}
spriteInfoList: []
fallbackSpriteAssets: []
--- !u!21 &5486996799770408029
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TextMeshPro/Sprite
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 6d52be7e63fdb714d8382335d2571cd3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _CullMode: 0
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9d3c6858e5f2dd1409283330b5815521
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,11 +1,9 @@
fileFormatVersion: 2
guid: cf24fa514f179b9489bdb9dd02138222
timeCreated: 1766415474
licenseType: Free
TextureImporter:
serializedVersion: 11
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
@@ -22,9 +20,12 @@ TextureImporter:
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
@@ -56,10 +57,15 @@ TextureImporter:
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
@@ -71,42 +77,297 @@ TextureImporter:
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
sprites:
- serializedVersion: 2
name: PW_GreenNumFont_0
rect:
serializedVersion: 2
x: 0
y: 97
width: 26
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 769d32bafa0aa91d7729f7263ec97f4c
internalID: 8850108842178756005
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_1
rect:
serializedVersion: 2
x: 31
y: 97
width: 18
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: bb8aa33eb1052fd64f47fde45b36ca21
internalID: -533229862921647087
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_2
rect:
serializedVersion: 2
x: 53
y: 97
width: 28
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 0dff005ac86e35602047c627695d53e5
internalID: 8286404865779659373
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_3
rect:
serializedVersion: 2
x: 81
y: 97
width: 26
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 5899dc1eacccf26ada6d4d4784725bf6
internalID: 8704875080046464024
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_4
rect:
serializedVersion: 2
x: 107
y: 97
width: 28
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 3083c4045d5b3f55ad52d9a3ffc66277
internalID: 8715104258653817184
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_5
rect:
serializedVersion: 2
x: 135
y: 97
width: 27
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 88b7b788b24185104f1c0b5ebf6ac140
internalID: 9055481150712168238
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_6
rect:
serializedVersion: 2
x: 162
y: 97
width: 27
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 9cfe8406f5e19c5dbea8ed0633df3448
internalID: 6557447886204408265
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_7
rect:
serializedVersion: 2
x: 189
y: 97
width: 24
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2647e6aded8907e5beeae400b2841797
internalID: -4562621924380356974
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_8
rect:
serializedVersion: 2
x: 215
y: 97
width: 28
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 545260c352445f4440e5fb328f8037d3
internalID: -3940672070431511383
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PW_GreenNumFont_9
rect:
serializedVersion: 2
x: 0
y: 65
width: 26
height: 31
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 8c6023223608d456600617feee87ebf7
internalID: -2622589409411979223
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID:
internalID: 0
vertices: []
indices:
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
output:
textureImportInstructions:
compressedFormat: 0
uncompressedFormat: 0
desiredFormat: 0
usageMode: 0
colorSpace: 1
androidETC2FallbackFormat: 0
width: 0
height: 0
compressionQuality: 0
androidETC2FallbackDownscale: 0
sourceTextureInformation:
width: 0
height: 0
doesTextureContainAlpha: 0
sourceWasHDR: 0
importInspectorWarnings:
nameFileIdTable:
PW_GreenNumFont_0: 8850108842178756005
PW_GreenNumFont_1: -533229862921647087
PW_GreenNumFont_2: 8286404865779659373
PW_GreenNumFont_3: 8704875080046464024
PW_GreenNumFont_4: 8715104258653817184
PW_GreenNumFont_5: 9055481150712168238
PW_GreenNumFont_6: 6557447886204408265
PW_GreenNumFont_7: -4562621924380356974
PW_GreenNumFont_8: -3940672070431511383
PW_GreenNumFont_9: -2622589409411979223
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: pw_font
assetBundleVariant:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,316 @@
%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: 84a92b25f83d49b9bc132d206b370281, type: 3}
m_Name: PW_GreenNumFont_SpriteAsset
m_EditorClassIdentifier:
hashCode: 0
material: {fileID: 2498657657507272924}
materialHashCode: 0
m_Version: 1.1.0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName:
m_StyleName:
m_PointSize: 0
m_Scale: 0
m_UnitsPerEM: 0
m_LineHeight: 0
m_AscentLine: 0
m_CapLine: 0
m_MeanLine: 0
m_Baseline: 0
m_DescentLine: 0
m_SuperscriptOffset: 0
m_SuperscriptSize: 0
m_SubscriptOffset: 0
m_SubscriptSize: 0
m_UnderlineOffset: 0
m_UnderlineThickness: 0
m_StrikethroughOffset: 0
m_StrikethroughThickness: 0
m_TabWidth: 0
spriteSheet: {fileID: 2800000, guid: cf24fa514f179b9489bdb9dd02138222, type: 3}
m_SpriteCharacterTable:
- m_ElementType: 2
m_Unicode: 48
m_GlyphIndex: 0
m_Scale: 1
m_Name: 0
m_HashCode: 48
- m_ElementType: 2
m_Unicode: 49
m_GlyphIndex: 1
m_Scale: 1
m_Name: 1
m_HashCode: 49
- m_ElementType: 2
m_Unicode: 50
m_GlyphIndex: 2
m_Scale: 1
m_Name: 2
m_HashCode: 50
- m_ElementType: 2
m_Unicode: 51
m_GlyphIndex: 3
m_Scale: 1
m_Name: 3
m_HashCode: 51
- m_ElementType: 2
m_Unicode: 52
m_GlyphIndex: 4
m_Scale: 1
m_Name: 4
m_HashCode: 52
- m_ElementType: 2
m_Unicode: 53
m_GlyphIndex: 5
m_Scale: 1
m_Name: 5
m_HashCode: 53
- m_ElementType: 2
m_Unicode: 54
m_GlyphIndex: 6
m_Scale: 1
m_Name: 6
m_HashCode: 54
- m_ElementType: 2
m_Unicode: 55
m_GlyphIndex: 7
m_Scale: 1
m_Name: 7
m_HashCode: 55
- m_ElementType: 2
m_Unicode: 56
m_GlyphIndex: 8
m_Scale: 1
m_Name: 8
m_HashCode: 56
- m_ElementType: 2
m_Unicode: 57
m_GlyphIndex: 9
m_Scale: 1
m_Name: 9
m_HashCode: 57
m_SpriteGlyphTable:
- m_Index: 0
m_Metrics:
m_Width: 26
m_Height: 31
m_HorizontalBearingX: -13
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 26
m_GlyphRect:
m_X: 0
m_Y: 97
m_Width: 26
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 8850108842178756005, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 1
m_Metrics:
m_Width: 18
m_Height: 31
m_HorizontalBearingX: -9
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 18
m_GlyphRect:
m_X: 31
m_Y: 97
m_Width: 18
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -533229862921647087, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 2
m_Metrics:
m_Width: 28
m_Height: 31
m_HorizontalBearingX: -14
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 28
m_GlyphRect:
m_X: 53
m_Y: 97
m_Width: 28
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 8286404865779659373, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 3
m_Metrics:
m_Width: 26
m_Height: 31
m_HorizontalBearingX: -13
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 26
m_GlyphRect:
m_X: 81
m_Y: 97
m_Width: 26
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 8704875080046464024, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 4
m_Metrics:
m_Width: 28
m_Height: 31
m_HorizontalBearingX: -14
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 28
m_GlyphRect:
m_X: 107
m_Y: 97
m_Width: 28
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 8715104258653817184, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 5
m_Metrics:
m_Width: 27
m_Height: 31
m_HorizontalBearingX: -13.5
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 27
m_GlyphRect:
m_X: 135
m_Y: 97
m_Width: 27
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 9055481150712168238, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 6
m_Metrics:
m_Width: 27
m_Height: 31
m_HorizontalBearingX: -13.5
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 27
m_GlyphRect:
m_X: 162
m_Y: 97
m_Width: 27
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: 6557447886204408265, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 7
m_Metrics:
m_Width: 24
m_Height: 31
m_HorizontalBearingX: -12
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 24
m_GlyphRect:
m_X: 189
m_Y: 97
m_Width: 24
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -4562621924380356974, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 8
m_Metrics:
m_Width: 28
m_Height: 31
m_HorizontalBearingX: -14
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 28
m_GlyphRect:
m_X: 215
m_Y: 97
m_Width: 28
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -3940672070431511383, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
- m_Index: 9
m_Metrics:
m_Width: 26
m_Height: 31
m_HorizontalBearingX: -13
m_HorizontalBearingY: 15.5
m_HorizontalAdvance: 26
m_GlyphRect:
m_X: 0
m_Y: 65
m_Width: 26
m_Height: 31
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
sprite: {fileID: -2622589409411979223, guid: cf24fa514f179b9489bdb9dd02138222,
type: 3}
spriteInfoList: []
fallbackSpriteAssets: []
--- !u!21 &2498657657507272924
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TextMeshPro/Sprite
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: cf24fa514f179b9489bdb9dd02138222, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _CullMode: 0
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c622059474a02f74ea8eee276c217f05
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -4,21 +4,30 @@ using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using TMPro;
using UnityEngine.TextCore;
/// <summary>
/// FntSpriteSplitter Editor 窗口
///
/// 功能:将 BMFont .fnt 文件中的字符定义分割为对应 PNG 的多个 Sprite,
/// 功能:将字体定义文件中的字符分割为对应 PNG 的多个 Sprite,
/// 写入 PNG.meta 的 spriteSheet.sprites 中。
/// 使用方法:
/// 1. 把 .fnt 文件拖到「FNT 文件」槽位(或点击选择)
/// 2. 自动识别 .fnt 中 page file 引用的 PNG;可在「目标 PNG」槽位手动覆盖
/// 3. 点击「写入 Meta」即可生成分割 Sprite
///
/// 说明:
/// - BMFont 坐标原点在左上(y 向下递增),Unity Sprite rect 原点在左下(y 向上递增),
/// 写入时会自动翻转 y:y_unity = textureHeight - y_fnt - height
/// - 命名规则可选「按索引」(PNG名_0, PNG名_1...) 或「按字符含义」(0,1,...,plus,comma,dot...)
/// 支持三种输入格式:
/// 1. .fnt - BMFont 文本格式(标准)
/// 2. .bytes - 内容为 BMFont .fnt 文本格式(Unity 用 .bytes 后缀作为 TextAsset 加载)
/// 3. .asset - Unity 原生 Font 资源(!u!128,m_CharacterRects 列表 + 归一化 UV)
///
/// 坐标系说明:
/// - BMFont 像素坐标原点在左上(y 向下递增),Unity Sprite rect 原点在左下(y 向上递增),
/// BMFont 格式需要翻转 y:y_unity = textureHeight - y_fnt - height
/// - Unity Font 的 UV 是归一化坐标(原点左下,y 向上),与 Sprite rect 一致,无需翻转
///
/// 使用方法:
/// 1. 把字体文件拖到「字体文件」槽位(.fnt / .bytes / .asset 均可)
/// 2. 自动识别格式并解析字符;BMFont 格式还会自动从 page file 引用对应 PNG
/// 3. 在「目标 PNG」槽位确认或手动指定 PNG
/// 4. 点击「写入 Meta」生成分割 Sprite
///
/// 作者:AI Assistant
/// </summary>
@@ -26,18 +35,21 @@ public class FntSpriteSplitter : EditorWindow
{
#region 字段
/// <summary>选中的 .fnt 文件路径(Assets/... 形式)</summary>
private string fntAssetPath = "";
/// <summary>选中的字体文件路径(Assets/... 形式)</summary>
private string fontAssetPath = "";
/// <summary>当前文件格式</summary>
private FontFormat fontFormat = FontFormat.Unknown;
/// <summary>目标 PNG 纹理</summary>
private Texture2D targetTexture;
/// <summary>.fnt 中声明的贴图尺寸(scaleW / scaleH)</summary>
private int fntTextureW = 0;
private int fntTextureH = 0;
/// <summary>.fnt 中声明的贴图尺寸(scaleW / scaleH);.asset 格式为 0(用 PNG 实际尺寸)</summary>
private int fontTextureW = 0;
private int fontTextureH = 0;
/// <summary>解析出的字符列表</summary>
private List<FntCharInfo> charList = new List<FntCharInfo>();
private List<FontCharInfo> charList = new List<FontCharInfo>();
/// <summary>字符列表滚动位置</summary>
private Vector2 scrollPos;
@@ -60,19 +72,25 @@ public class FntSpriteSplitter : EditorWindow
#region 数据结构
/// <summary>单个 BMFont 字符的解析信息</summary>
private class FntCharInfo
/// <summary>字体文件格式</summary>
private enum FontFormat
{
Unknown,
BmFontFnt, // .fnt 或 .bytes,BMFont 文本格式
UnityFontAsset // .asset,Unity 原生 Font(!u!128)
}
/// <summary>单个字符的解析信息(统一格式)</summary>
private class FontCharInfo
{
public int id; // 字符 unicode id
public int x; // fnt 中 x(左上原点)
public int y; // fnt 中 y(左上原点)
public int width;
public int height;
public int xoffset;
public int yoffset;
public int xadvance;
public int x; // 在 PNG 中的像素 x(左下原点)
public int y; // 在 PNG 中的像素 y(左下原点,已翻转)
public int width; // 像素宽
public int height; // 像素高
public int advance; // 字符前进宽度(仅供信息显示)
/// <summary>Unity 坐标系下的 rect(已翻转 y)</summary>
/// <summary>Unity 坐标系下的 rect(已翻转 y,可直接写入 meta)</summary>
public Rect unityRect;
}
@@ -84,7 +102,7 @@ public class FntSpriteSplitter : EditorWindow
private static void ShowWindow()
{
var window = GetWindow<FntSpriteSplitter>("FNT Sprite Splitter");
window.minSize = new Vector2(440, 540);
window.minSize = new Vector2(440, 560);
window.Show();
}
@@ -95,7 +113,7 @@ public class FntSpriteSplitter : EditorWindow
private void OnGUI()
{
DrawHeader();
DrawFntSlot();
DrawFontSlot();
DrawPngSlot();
DrawCharList();
DrawOptions();
@@ -108,21 +126,25 @@ public class FntSpriteSplitter : EditorWindow
{
EditorGUILayout.Space(8);
EditorGUILayout.HelpBox(
"将 BMFont .fnt 文件中的字符定义分割为 PNG 的多个 Sprite。\n" +
"1. 拖入 .fnt 文件(自动识别对应 PNG)\n" +
"将字体定义文件中的字符分割为 PNG 的多个 Sprite。\n" +
"支持三种格式:\n" +
" .fnt - BMFont 文本格式\n" +
" .bytes - 内容为 BMFont .fnt 文本格式\n" +
" .asset - Unity 原生 Font 资源(!u!128)\n" +
"1. 拖入字体文件(BMFont 格式会自动识别对应 PNG)\n" +
"2. 点击「写入 Meta」生成分割 Sprite\n" +
"(y 坐标会自动从 BMFont 左上原点翻转为 Unity 左下原点)",
"3. 点击「生成 TMP_SpriteAsset」生成可直接用于 <sprite=索引> 的数字精灵资源",
MessageType.Info
);
EditorGUILayout.Space(4);
}
/// <summary>.fnt 文件拖拽槽位</summary>
private void DrawFntSlot()
/// <summary>字体文件拖拽槽位</summary>
private void DrawFontSlot()
{
EditorGUILayout.LabelField("FNT 文件", EditorStyles.boldLabel);
EditorGUILayout.LabelField("字体文件", EditorStyles.boldLabel);
Rect dropRect = EditorGUILayout.GetControlRect(GUILayout.Height(48));
Rect dropRect = EditorGUILayout.GetControlRect(GUILayout.Height(56));
GUI.Box(dropRect, "", GUI.skin.box);
var centeredStyle = new GUIStyle(GUI.skin.label)
@@ -131,18 +153,18 @@ public class FntSpriteSplitter : EditorWindow
fontSize = 12
};
if (!string.IsNullOrEmpty(fntAssetPath))
if (!string.IsNullOrEmpty(fontAssetPath))
{
string fileName = Path.GetFileName(fntAssetPath);
int charCount = charList.Count;
string texInfo = (fntTextureW > 0 && fntTextureH > 0)
? $" 贴图 {fntTextureW}x{fntTextureH} 字符 {charCount} 个"
: $" 字符 {charCount} 个";
GUI.Label(dropRect, $"{fileName}\n{texInfo}", centeredStyle);
string fileName = Path.GetFileName(fontAssetPath);
string formatName = FormatToDisplay(fontFormat);
string texInfo = (fontTextureW > 0 && fontTextureH > 0)
? $" 贴图 {fontTextureW}x{fontTextureH} 字符 {charList.Count} 个"
: $" 字符 {charList.Count} 个";
GUI.Label(dropRect, $"{fileName}\n[{formatName}]{texInfo}", centeredStyle);
}
else
{
GUI.Label(dropRect, "拖入 .fnt 文件 或 点击选择", centeredStyle);
GUI.Label(dropRect, "拖入 .fnt / .bytes / .asset 文件\n或 点击选择", centeredStyle);
}
// 拖拽事件
@@ -151,7 +173,7 @@ public class FntSpriteSplitter : EditorWindow
bool valid = false;
foreach (var p in DragAndDrop.paths)
{
if (p.EndsWith(".fnt", System.StringComparison.OrdinalIgnoreCase))
if (IsSupportedFontFile(p))
{
valid = true;
break;
@@ -165,9 +187,9 @@ public class FntSpriteSplitter : EditorWindow
DragAndDrop.AcceptDrag();
foreach (var p in DragAndDrop.paths)
{
if (p.EndsWith(".fnt", System.StringComparison.OrdinalIgnoreCase))
if (IsSupportedFontFile(p))
{
LoadFntFile(p);
LoadFontFile(p);
break;
}
}
@@ -176,17 +198,18 @@ public class FntSpriteSplitter : EditorWindow
// 点击选择按钮
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("选择 .fnt 文件", GUILayout.Height(24)))
if (GUILayout.Button("选择字体文件", GUILayout.Height(24)))
{
string startDir = string.IsNullOrEmpty(fntAssetPath)
string startDir = string.IsNullOrEmpty(fontAssetPath)
? Application.dataPath
: Path.GetDirectoryName(Path.GetFullPath(fntAssetPath));
: Path.GetDirectoryName(Path.GetFullPath(fontAssetPath));
string picked = EditorUtility.OpenFilePanelWithFilters(
"选择 FNT 文件", startDir, new[] { "FNT", "fnt", "All files", "*" });
"选择字体文件", startDir,
new[] { "Font files", "fnt,bytes,asset", "All files", "*" });
if (!string.IsNullOrEmpty(picked))
{
string assetPath = "Assets" + picked.Substring(Application.dataPath.Length).Replace('\\', '/');
LoadFntFile(assetPath);
LoadFontFile(assetPath);
}
}
@@ -219,11 +242,15 @@ public class FntSpriteSplitter : EditorWindow
int texW = targetTexture.width;
int texH = targetTexture.height;
// 检查 PNG 实际尺寸与 .fnt 声明是否一致
// 检查 PNG 实际尺寸与字体声明是否一致
string warning = "";
if (fntTextureW > 0 && (texW != fntTextureW || texH != fntTextureH))
if (fontTextureW > 0 && (texW != fontTextureW || texH != fontTextureH))
{
warning = $"\n<color=red>⚠ 尺寸不匹配!FNT 声明 {fntTextureW}x{fntTextureH}</color>";
warning = $"\n<color=red>⚠ 尺寸不匹配!字体声明 {fontTextureW}x{fontTextureH}</color>";
}
else if (fontFormat == FontFormat.UnityFontAsset)
{
warning = "\n<color=yellow>Unity Font 模式:UV 已按 PNG 实际尺寸换算</color>";
}
var richStyle = new GUIStyle(centeredStyle) { richText = true };
@@ -231,7 +258,7 @@ public class FntSpriteSplitter : EditorWindow
}
else
{
GUI.Label(dropRect, "拖入 PNG 或 点击选择(留空则自动从 .fnt 识别)", centeredStyle);
GUI.Label(dropRect, "拖入 PNG 或 点击选择(BMFont 格式可自动识别)", centeredStyle);
}
// 拖拽事件
@@ -261,6 +288,7 @@ public class FntSpriteSplitter : EditorWindow
{
targetTexture = tex;
namePrefix = Path.GetFileNameWithoutExtension(p);
RecomputeRectsForPngSize();
}
break;
}
@@ -305,28 +333,25 @@ public class FntSpriteSplitter : EditorWindow
fontSize = 12,
normal = { textColor = Color.gray }
};
GUI.Label(listRect, "拖入 .fnt 文件后会显示字符列表", hintStyle);
GUI.Label(listRect, "拖入字体文件后会显示字符列表", hintStyle);
}
else
{
var innerRect = new Rect(listRect.x + 4, listRect.y + 4, listRect.width - 8, listRect.height - 8);
// 表头高度
float headerH = 20;
float rowH = 20;
float contentH = headerH + charList.Count * rowH;
scrollPos = GUI.BeginScrollView(innerRect, scrollPos, new Rect(0, 0, innerRect.width - 16, contentH));
// 表头
var headerStyle = new GUIStyle(EditorStyles.boldLabel) { fontSize = 10 };
float col1 = innerRect.width * 0.12f; // index
float col2 = innerRect.width * 0.20f; // char
float col3 = innerRect.width * 0.30f; // rect (fnt)
float col4 = innerRect.width * 0.30f; // rect (unity)
// 余下用于 padding
float col1 = innerRect.width * 0.10f; // index
float col2 = innerRect.width * 0.15f; // char
float col3 = innerRect.width * 0.35f; // rect (unity)
float col4 = innerRect.width * 0.30f; // size
GUI.Label(new Rect(2, 0, col1, headerH), "#", headerStyle);
GUI.Label(new Rect(col1, 0, col2, headerH), "char", headerStyle);
GUI.Label(new Rect(col1 + col2, 0, col3, headerH), "fnt(x,y,w,h)", headerStyle);
GUI.Label(new Rect(col1 + col2 + col3, 0, col4, headerH), "unity(x,y,w,h)", headerStyle);
GUI.Label(new Rect(col1 + col2, 0, col3, headerH), "unity(x,y,w,h)", headerStyle);
GUI.Label(new Rect(col1 + col2 + col3, 0, col4, headerH), "size", headerStyle);
for (int i = 0; i < charList.Count; i++)
{
@@ -346,10 +371,10 @@ public class FntSpriteSplitter : EditorWindow
GUI.Label(new Rect(2, y, col1, rowH), i.ToString(), rowStyle);
GUI.Label(new Rect(col1, y, col2, rowH), CharToLabel(ch.id), rowStyle);
GUI.Label(new Rect(col1 + col2, y, col3, rowH),
$"({ch.x},{ch.y},{ch.width}x{ch.height})", rowStyle);
GUI.Label(new Rect(col1 + col2 + col3, y, col4, rowH),
$"({(int)ch.unityRect.x},{(int)ch.unityRect.y},{(int)ch.unityRect.width}x{(int)ch.unityRect.height})",
rowStyle);
GUI.Label(new Rect(col1 + col2 + col3, y, col4, rowH),
$"{ch.width}x{ch.height}", rowStyle);
}
GUI.EndScrollView();
@@ -384,7 +409,7 @@ public class FntSpriteSplitter : EditorWindow
/// <summary>操作按钮区</summary>
private void DrawActionBar()
{
bool canWrite = !string.IsNullOrEmpty(fntAssetPath) && targetTexture != null && charList.Count > 0;
bool canWrite = !string.IsNullOrEmpty(fontAssetPath) && targetTexture != null && charList.Count > 0;
GUI.enabled = canWrite;
if (GUILayout.Button("写入 Meta", GUILayout.Height(32)))
@@ -413,6 +438,15 @@ public class FntSpriteSplitter : EditorWindow
EditorGUILayout.EndHorizontal();
// 生成 TMP_SpriteAsset
EditorGUILayout.Space(4);
GUI.enabled = canWrite;
if (GUILayout.Button("生成 TMP_SpriteAsset", GUILayout.Height(28)))
{
GenerateTMPSpriteAsset();
}
GUI.enabled = true;
EditorGUILayout.Space(6);
}
@@ -434,10 +468,40 @@ public class FntSpriteSplitter : EditorWindow
#endregion
#region FNT 加载与解析
#region 字体文件加载与解析
/// <summary>加载并解析 .fnt 文件</summary>
private void LoadFntFile(string assetPath)
/// <summary>判断文件是否为支持的字格式</summary>
private bool IsSupportedFontFile(string path)
{
if (string.IsNullOrEmpty(path)) return false;
string ext = Path.GetExtension(path).ToLowerInvariant();
if (ext == ".fnt" || ext == ".bytes") return true;
if (ext == ".asset")
{
// .asset 需要检查内容是否为 Unity Font (!u!128)
try
{
string text = File.ReadAllText(Path.GetFullPath(path), Encoding.UTF8);
return text.Contains("!u!128") && text.Contains("m_CharacterRects");
}
catch { return false; }
}
return false;
}
/// <summary>格式枚举转显示文本</summary>
private string FormatToDisplay(FontFormat fmt)
{
switch (fmt)
{
case FontFormat.BmFontFnt: return "BMFont 文本";
case FontFormat.UnityFontAsset: return "Unity Font (.asset)";
default: return "未知格式";
}
}
/// <summary>加载并解析字体文件</summary>
private void LoadFontFile(string assetPath)
{
if (string.IsNullOrEmpty(assetPath) || !File.Exists(Path.GetFullPath(assetPath)))
{
@@ -445,29 +509,57 @@ public class FntSpriteSplitter : EditorWindow
return;
}
fntAssetPath = assetPath;
fontAssetPath = assetPath;
charList.Clear();
logText = "";
string ext = Path.GetExtension(assetPath).ToLowerInvariant();
string text = File.ReadAllText(Path.GetFullPath(assetPath), Encoding.UTF8);
// 识别格式
if (ext == ".asset" && text.Contains("!u!128"))
{
fontFormat = FontFormat.UnityFontAsset;
ParseUnityFontAsset(text);
}
else if (ext == ".fnt" || ext == ".bytes" || text.Contains("common") && text.Contains("scaleW"))
{
fontFormat = FontFormat.BmFontFnt;
ParseBmFontText(text);
}
else
{
EditorUtility.DisplayDialog("格式不支持",
$"无法识别文件格式:{assetPath}\n支持 .fnt / .bytes (BMFont文本) / .asset (Unity Font)", "确定");
fontFormat = FontFormat.Unknown;
return;
}
// 自动查找对应 PNG(仅 BMFont 格式有 page file 引用,Unity Font 的纹理引用通常为空)
if (fontFormat == FontFormat.BmFontFnt)
{
AutoFindPngFromBmFontPage(text, assetPath);
}
RecomputeRectsForPngSize();
Repaint();
}
/// <summary>解析 BMFont 文本格式(.fnt 或 .bytes)</summary>
private void ParseBmFontText(string text)
{
// 解析 common 行:scaleW 和 scaleH
var commonMatch = Regex.Match(text, @"^common\s+.*?scaleW=(\d+)\s+scaleH=(\d+)",
RegexOptions.Multiline);
if (!commonMatch.Success)
{
EditorUtility.DisplayDialog("解析失败", "找不到 common 行或 scaleW/scaleH 字段", "确定");
fntTextureW = 0;
fntTextureH = 0;
fontTextureW = 0;
fontTextureH = 0;
return;
}
fntTextureW = int.Parse(commonMatch.Groups[1].Value);
fntTextureH = int.Parse(commonMatch.Groups[2].Value);
// 解析 page 行:file="xxx.png"
var pageMatch = Regex.Match(text, @"^page\s+id=\d+\s+file=""([^""]+)""",
RegexOptions.Multiline);
string pageFileName = pageMatch.Success ? pageMatch.Groups[1].Value : "";
fontTextureW = int.Parse(commonMatch.Groups[1].Value);
fontTextureH = int.Parse(commonMatch.Groups[2].Value);
// 解析所有 char 行
charList.Clear();
@@ -476,56 +568,155 @@ public class FntSpriteSplitter : EditorWindow
@"\s+xoffset=(-?\d+)\s+yoffset=(-?\d+)\s+xadvance=(-?\d+)",
RegexOptions.Multiline))
{
var info = new FntCharInfo
var info = new FontCharInfo
{
id = int.Parse(m.Groups[1].Value),
x = int.Parse(m.Groups[2].Value),
y = int.Parse(m.Groups[3].Value),
width = int.Parse(m.Groups[4].Value),
height = int.Parse(m.Groups[5].Value),
xoffset = int.Parse(m.Groups[6].Value),
yoffset = int.Parse(m.Groups[7].Value),
xadvance = int.Parse(m.Groups[8].Value),
advance = int.Parse(m.Groups[8].Value),
};
// y 翻转:BMFont 左上原点 → Unity 左下原点
int flipY = fntTextureH - info.y - info.height;
int flipY = fontTextureH - info.y - info.height;
info.unityRect = new Rect(info.x, flipY, info.width, info.height);
charList.Add(info);
}
}
// 自动查找对应 PNG
if (!string.IsNullOrEmpty(pageFileName))
/// <summary>解析 Unity 原生 Font .asset(!u!128)</summary>
private void ParseUnityFontAsset(string text)
{
// Unity Font 没有 scaleW/scaleH,UV 是归一化的,需要靠 PNG 实际尺寸换算
fontTextureW = 0;
fontTextureH = 0;
// 每个 m_CharacterRects 列表项格式:
// - serializedVersion: 2
// index: 43
// uv:
// serializedVersion: 2
// x: 0.578125
// y: 0.28125
// width: 0.15625
// height: 0.15625
// vert:
// serializedVersion: 2
// x: 0
// y: 5
// width: 10
// height: -10
// advance: 10
// flipped: 0
charList.Clear();
// 匹配每个字符块(从 index: 到下一个 index: 或 m_KerningValues 之前)
var charBlockPattern = new Regex(
@"index:\s*(-?\d+)\s*\n\s*uv:\s*\n\s*serializedVersion:\s*\d+\s*\n" +
@"\s*x:\s*([-0-9.]+)\s*\n\s*y:\s*([-0-9.]+)\s*\n" +
@"\s*width:\s*([-0-9.]+)\s*\n\s*height:\s*([-0-9.]+)\s*\n" +
@"\s*vert:\s*\n\s*serializedVersion:\s*\d+\s*\n" +
@"\s*x:\s*([-0-9.]+)\s*\n\s*y:\s*([-0-9.]+)\s*\n" +
@"\s*width:\s*([-0-9.]+)\s*\n\s*height:\s*([-0-9.]+)\s*\n" +
@"\s*advance:\s*(-?[-0-9.]+)",
RegexOptions.Multiline);
foreach (Match m in charBlockPattern.Matches(text))
{
// 优先从 .fnt 同目录查找
string fntDir = Path.GetDirectoryName(assetPath).Replace('\\', '/');
string candidatePath = fntDir + "/" + pageFileName;
var tex = AssetDatabase.LoadAssetAtPath<Texture2D>(candidatePath);
if (tex == null)
int charId = int.Parse(m.Groups[1].Value);
float uvX = float.Parse(m.Groups[2].Value, System.Globalization.CultureInfo.InvariantCulture);
float uvY = float.Parse(m.Groups[3].Value, System.Globalization.CultureInfo.InvariantCulture);
float uvW = float.Parse(m.Groups[4].Value, System.Globalization.CultureInfo.InvariantCulture);
float uvH = float.Parse(m.Groups[5].Value, System.Globalization.CultureInfo.InvariantCulture);
// vert 字段在 UV 原点已是左下时不需要用于 rect 计算,width/height 可作为像素尺寸参考
// 但 Unity Font 的 vert.width/height 是字符绘制尺寸,应与 uv*textureSize 一致
// 这里使用 vert 的 width/height 作为像素宽高(更可靠)
float vertW = float.Parse(m.Groups[8].Value, System.Globalization.CultureInfo.InvariantCulture);
float vertH = float.Parse(m.Groups[9].Value, System.Globalization.CultureInfo.InvariantCulture);
// UV 是归一化坐标,原点左下,y 向上 → 与 Unity Sprite rect 一致,不需要翻转 y
// 实际像素坐标需在拿到 PNG 实际尺寸后才能计算,这里先存 UV,等 RecomputeRectsForPngSize 转换
// 为简化处理,这里直接用 PNG 实际尺寸换算(若 targetTexture 已设置)
int pixX, pixY, pixW, pixH;
if (targetTexture != null)
{
// 在整个项目中按文件名搜索
string nameWithoutExt = Path.GetFileNameWithoutExtension(pageFileName);
string[] guids = AssetDatabase.FindAssets(nameWithoutExt + " t:Texture2D");
foreach (string g in guids)
{
string p = AssetDatabase.GUIDToAssetPath(g);
if (p.EndsWith("/" + pageFileName, System.StringComparison.OrdinalIgnoreCase))
{
tex = AssetDatabase.LoadAssetAtPath<Texture2D>(p);
if (tex != null) break;
}
}
int texW = targetTexture.width;
int texH = targetTexture.height;
pixX = Mathf.RoundToInt(uvX * texW);
pixY = Mathf.RoundToInt(uvY * texH);
pixW = Mathf.RoundToInt(uvW * texW);
pixH = Mathf.RoundToInt(uvH * texH);
}
else
{
// PNG 未设置时暂存 0,等 PNG 加载后重算
pixX = 0; pixY = 0; pixW = Mathf.RoundToInt(vertW); pixH = Mathf.RoundToInt(Mathf.Abs(vertH));
}
if (tex != null)
var info = new FontCharInfo
{
targetTexture = tex;
namePrefix = Path.GetFileNameWithoutExtension(pageFileName);
id = charId,
x = pixX,
y = pixY,
width = pixW,
height = pixH,
advance = int.Parse(m.Groups[10].Value),
};
info.unityRect = new Rect(info.x, info.y, info.width, info.height);
charList.Add(info);
}
}
/// <summary>当 PNG 实际尺寸变化时,重新计算字符 rect(主要用于 Unity Font 模式)</summary>
private void RecomputeRectsForPngSize()
{
if (fontFormat != FontFormat.UnityFontAsset || targetTexture == null) return;
// 重新解析(因为 Unity Font 的 UV 需要乘以 PNG 尺寸)
if (!string.IsNullOrEmpty(fontAssetPath) && File.Exists(Path.GetFullPath(fontAssetPath)))
{
string text = File.ReadAllText(Path.GetFullPath(fontAssetPath), Encoding.UTF8);
ParseUnityFontAsset(text);
}
}
/// <summary>从 BMFont page file 自动查找 PNG</summary>
private void AutoFindPngFromBmFontPage(string text, string fntAssetPath)
{
var pageMatch = Regex.Match(text, @"^page\s+id=\d+\s+file=""([^""]+)""",
RegexOptions.Multiline);
if (!pageMatch.Success) return;
string pageFileName = pageMatch.Groups[1].Value;
// 优先从 .fnt 同目录查找
string fntDir = Path.GetDirectoryName(fntAssetPath).Replace('\\', '/');
string candidatePath = fntDir + "/" + pageFileName;
var tex = AssetDatabase.LoadAssetAtPath<Texture2D>(candidatePath);
if (tex == null)
{
// 在整个项目中按文件名搜索
string nameWithoutExt = Path.GetFileNameWithoutExtension(pageFileName);
string[] guids = AssetDatabase.FindAssets(nameWithoutExt + " t:Texture2D");
foreach (string g in guids)
{
string p = AssetDatabase.GUIDToAssetPath(g);
if (p.EndsWith("/" + pageFileName, System.StringComparison.OrdinalIgnoreCase))
{
tex = AssetDatabase.LoadAssetAtPath<Texture2D>(p);
if (tex != null) break;
}
}
}
Repaint();
if (tex != null)
{
targetTexture = tex;
namePrefix = Path.GetFileNameWithoutExtension(pageFileName);
}
}
/// <summary>把字符 id 映射成可读的名称标签</summary>
@@ -547,6 +738,7 @@ public class FntSpriteSplitter : EditorWindow
case 93: return "]";
case 123: return "{";
case 125: return "}";
case 120: return "x";
}
if (charId >= 48 && charId <= 57) return (charId - 48).ToString();
if (charId >= 65 && charId <= 90) return ((char)charId).ToString();
@@ -573,6 +765,7 @@ public class FntSpriteSplitter : EditorWindow
case 93: return "rbracket";
case 123: return "lbrace";
case 125: return "rbrace";
case 120: return "x";
}
if (charId >= 48 && charId <= 57) return (charId - 48).ToString();
if (charId >= 65 && charId <= 90) return ((char)charId).ToString();
@@ -589,7 +782,7 @@ public class FntSpriteSplitter : EditorWindow
{
if (targetTexture == null || charList.Count == 0)
{
EditorUtility.DisplayDialog("提示", "请先加载 .fnt 文件并选择目标 PNG", "确定");
EditorUtility.DisplayDialog("提示", "请先加载字体文件并选择目标 PNG", "确定");
return;
}
@@ -601,18 +794,29 @@ public class FntSpriteSplitter : EditorWindow
return;
}
// 使用 PNG 实际尺寸做 Y 翻转(如果与 fnt 声明不同,按实际尺寸为准)
int texW = targetTexture.width;
int texH = targetTexture.height;
if (texW != fntTextureW || texH != fntTextureH)
// 对 BMFont 格式,使用 PNG 实际尺寸做 Y 翻转(如果与 fnt 声明不同,按实际尺寸为准)
if (fontFormat == FontFormat.BmFontFnt)
{
Debug.LogWarning($"[FntSpriteSplitter] PNG 实际尺寸 {texW}x{texH} 与 fnt 声明 {fntTextureW}x{fntTextureH} 不一致,按实际尺寸翻转 y");
foreach (var ch in charList)
int texW = targetTexture.width;
int texH = targetTexture.height;
if (texW != fontTextureW || texH != fontTextureH)
{
int flipY = texH - ch.y - ch.height;
ch.unityRect = new Rect(ch.x, flipY, ch.width, ch.height);
Debug.LogWarning($"[FntSpriteSplitter] PNG 实际尺寸 {texW}x{texH} 与 fnt 声明 {fontTextureW}x{fontTextureH} 不一致,按实际尺寸翻转 y");
foreach (var ch in charList)
{
// 重新基于实际 texH 翻转:先还原 fnt 中的 y,再翻转
// fnt_y = fontTextureH - unity_y - height → 重新 unity_y = texH - fnt_y - height
int fntY = fontTextureH - (int)ch.unityRect.y - ch.height;
int flipY = texH - fntY - ch.height;
ch.unityRect = new Rect(ch.x, flipY, ch.width, ch.height);
}
}
}
else if (fontFormat == FontFormat.UnityFontAsset)
{
// Unity Font 模式:UV 已根据 PNG 实际尺寸换算,无需额外处理
RecomputeRectsForPngSize();
}
string prefix = string.IsNullOrEmpty(namePrefix)
? Path.GetFileNameWithoutExtension(pngPath)
@@ -698,8 +902,6 @@ public class FntSpriteSplitter : EditorWindow
if (idx >= 0)
{
int blockEnd = FindBlockEnd(result, idx);
// blockEnd 指向下一个同级字段的起始位置
// 在 blockEnd 前插入新内容(去掉 " sprites:\n" 前缀)
string newEntries = spritesYaml.ToString();
result = result.Substring(0, blockEnd) + newEntries + result.Substring(blockEnd);
}
@@ -720,7 +922,6 @@ public class FntSpriteSplitter : EditorWindow
}
else
{
// 追加:在 nameFileIdTable 块末尾插入新条目
int tblEndIdx = FindBlockEnd(result, tblIdx);
string extra = string.Join("\n", nameFileIdEntries) + "\n";
result = result.Substring(0, tblEndIdx) + extra + result.Substring(tblEndIdx);
@@ -750,7 +951,6 @@ public class FntSpriteSplitter : EditorWindow
string metaText = File.ReadAllText(metaPath, Encoding.UTF8);
// sprites: ...
string result = metaText;
int idx = result.IndexOf(" sprites:");
if (idx >= 0)
@@ -759,7 +959,6 @@ public class FntSpriteSplitter : EditorWindow
result = result.Substring(0, idx) + " sprites: []\n" + result.Substring(endIdx);
}
// nameFileIdTable: ...
int tblIdx = result.IndexOf(" nameFileIdTable:");
if (tblIdx >= 0)
{
@@ -774,6 +973,132 @@ public class FntSpriteSplitter : EditorWindow
showLog = true;
}
/// <summary>
/// 基于已解析的字符列表生成 TMP_SpriteAsset。
/// 字符表 m_Unicode 使用字体中的 u8 字符 id,m_GlyphIndex 对应 glyph 表下标,
/// 因此既支持 <sprite=索引> 也支持 <sprite=字符名> 引用。
/// glyph 的 sprite 引用会从 PNG 的子 Sprite 中按「前缀_下标」匹配(需先执行「写入 Meta」分割)。
/// </summary>
private void GenerateTMPSpriteAsset()
{
if (targetTexture == null || charList.Count == 0)
{
EditorUtility.DisplayDialog("提示", "请先加载字体文件并选择目标 PNG", "确定");
return;
}
string pngPath = AssetDatabase.GetAssetPath(targetTexture);
string prefix = string.IsNullOrEmpty(namePrefix)
? Path.GetFileNameWithoutExtension(pngPath)
: namePrefix;
// 从 PNG 加载所有子 Sprite(需先分割过 meta)
var allAssets = AssetDatabase.LoadAllAssetsAtPath(pngPath);
Dictionary<string, Sprite> spriteByName = new Dictionary<string, Sprite>();
foreach (var a in allAssets)
{
if (a is Sprite spr)
spriteByName[spr.name] = spr;
}
// 创建 SpriteAsset
var spriteAsset = ScriptableObject.CreateInstance<TMP_SpriteAsset>();
spriteAsset.name = prefix + "_SpriteAsset";
spriteAsset.spriteSheet = targetTexture;
// 设置版本号,避免 getter/UpdateLookupTables 触发 UpgradeSpriteAsset
// (默认 m_Version 为空,UpgradeSpriteAsset 会访问未初始化的 spriteInfoList 导致 NullReferenceException)
var versionField = typeof(TMP_SpriteAsset).GetField("m_Version",
System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
if (versionField != null)
versionField.SetValue(spriteAsset, "1.1.0");
// 创建 Sprite 材质(TextMeshPro/Sprite shader)
Shader shader = Shader.Find("TextMeshPro/Sprite");
if (shader == null)
shader = Shader.Find("TextMeshPro/Mobile/Distance Field");
Material mat = new Material(shader);
mat.name = "TextMeshPro/Sprite";
mat.mainTexture = targetTexture;
spriteAsset.material = mat;
var glyphTable = new List<TMP_SpriteGlyph>();
var charTable = new List<TMP_SpriteCharacter>();
for (int i = 0; i < charList.Count; i++)
{
var ch = charList[i];
// glyph:按子 Sprite 命名「前缀_下标」查找引用
string spriteName = prefix + "_" + i;
Sprite spr;
spriteByName.TryGetValue(spriteName, out spr);
var glyph = new TMP_SpriteGlyph();
glyph.index = (uint)i;
glyph.metrics = new GlyphMetrics(
ch.width, ch.height,
-ch.width / 2f, ch.height / 2f,
ch.width);
glyph.glyphRect = new GlyphRect(
(int)ch.unityRect.x, (int)ch.unityRect.y,
(int)ch.unityRect.width, (int)ch.unityRect.height);
glyph.scale = 1f;
glyph.atlasIndex = 0;
glyph.sprite = spr;
glyphTable.Add(glyph);
// character:m_Unicode 使用 u8 字符 id,m_Name 为字符本身
var character = new TMP_SpriteCharacter();
character.unicode = (uint)ch.id;
character.glyphIndex = (uint)i;
character.scale = 1f;
character.name = CharToName(ch.id);
charTable.Add(character);
}
// setter 为 internal,改用公开 getter 返回的列表直接填充
spriteAsset.spriteGlyphTable.Clear();
spriteAsset.spriteGlyphTable.AddRange(glyphTable);
spriteAsset.spriteCharacterTable.Clear();
spriteAsset.spriteCharacterTable.AddRange(charTable);
spriteAsset.spriteInfoList = new List<TMP_Sprite>();
spriteAsset.fallbackSpriteAssets = new List<TMP_SpriteAsset>();
spriteAsset.UpdateLookupTables();
// 保存:材质作为 SpriteAsset 的子资源,结构与现有 asset 一致
string dir = Path.GetDirectoryName(pngPath).Replace('\\', '/');
string assetPath = dir + "/" + spriteAsset.name + ".asset";
assetPath = AssetDatabase.GenerateUniqueAssetPath(assetPath);
AssetDatabase.CreateAsset(spriteAsset, assetPath);
AssetDatabase.AddObjectToAsset(mat, spriteAsset);
AssetDatabase.SaveAssets();
AssetDatabase.ImportAsset(assetPath, ImportAssetOptions.ForceUpdate);
int missingSprite = 0;
foreach (var g in glyphTable)
if (g.sprite == null)
missingSprite++;
StringBuilder sb = new StringBuilder();
sb.AppendLine($"[完成] 已生成 TMP_SpriteAsset:");
sb.AppendLine($" {assetPath}");
int[] charCodes = new int[charList.Count];
for (int i = 0; i < charList.Count; i++) charCodes[i] = charList[i].id;
sb.AppendLine($" 字符 id 码: {string.Join(",", charCodes)}");
sb.AppendLine($" 字符表: {charTable.Count} 个, glyph 表: {glyphTable.Count} 个");
if (missingSprite > 0)
sb.AppendLine($" ⚠ {missingSprite} 个 glyph 未匹配到子 Sprite(请先执行「写入 Meta」分割)");
sb.AppendLine("\n→ 使用方法: tmp.spriteAsset = 该资源; text = \"<sprite=0><sprite=1>...\"");
logText = sb.ToString();
showLog = true;
Debug.Log("[FntSpriteSplitter] 生成 TMP_SpriteAsset\n" + logText);
EditorGUIUtility.PingObject(spriteAsset);
}
#endregion
#region 工具方法
@@ -781,11 +1106,12 @@ public class FntSpriteSplitter : EditorWindow
/// <summary>重置所有状态</summary>
private void ClearAll()
{
fntAssetPath = "";
fontAssetPath = "";
fontFormat = FontFormat.Unknown;
targetTexture = null;
charList.Clear();
fntTextureW = 0;
fntTextureH = 0;
fontTextureW = 0;
fontTextureH = 0;
namePrefix = "";
logText = "";
Repaint();
@@ -808,7 +1134,6 @@ public class FntSpriteSplitter : EditorWindow
private int FindBlockEnd(string text, int blockStartIndex)
{
int i = blockStartIndex;
// 跳过 " keyName:" 这一行
int lineEnd = text.IndexOf('\n', i);
if (lineEnd < 0) return text.Length;
i = lineEnd + 1;
@@ -819,44 +1144,36 @@ public class FntSpriteSplitter : EditorWindow
if (nextNewline < 0) nextNewline = text.Length;
string line = text.Substring(i, nextNewline - i);
// 空行跳过
if (line.Trim().Length == 0)
{
i = nextNewline + 1;
continue;
}
// " - " 开头 → 仍是列表项
if (line.StartsWith(" - "))
{
i = nextNewline + 1;
continue;
}
// " "(6 空格)开头 → 子属性
if (line.StartsWith(" "))
{
i = nextNewline + 1;
continue;
}
// " "(4 空格)开头但不是 "-" → 下一个同级字段,块结束
if (line.StartsWith(" ") && !line.StartsWith(" - ") && !line.StartsWith(" "))
{
return i;
}
// 其他情况(缩进更少),块结束
return i;
}
return text.Length;
}
/// <summary>
/// 基于 sprite 名称生成稳定的 32 位 hex spriteID。
/// 使用 MD5 保证同一名称每次生成结果一致,便于多次写入时保持稳定。
/// </summary>
/// <summary>基于 sprite 名称生成稳定的 32 位 hex spriteID</summary>
private string GenerateSpriteID(string name)
{
using (var md5 = System.Security.Cryptography.MD5.Create())
+1 -75
View File
@@ -6290,7 +6290,7 @@ MonoBehaviour:
spawnList: []
isCreateFish: 0
isFrozen: 0
debugSpawnFishNumber: 11043
debugSpawnFishNumber: 12026
fishList_All: []
fishList_Small: []
fishList_Boss: []
@@ -6686,79 +6686,6 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1001 &3576565829365767112
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalPosition.x
value: -18.6
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalPosition.y
value: -7.5
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5702105387175251982, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5704757047509397805, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_Name
value: PW_Bullet_Hole Variant
objectReference: {fileID: 0}
- target: {fileID: 5704757047509397805, guid: b58d43519dd150e45b29f10643a07304,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b58d43519dd150e45b29f10643a07304, type: 3}
--- !u!224 &3713989706261354992
RectTransform:
m_ObjectHideFlags: 0
@@ -7487,4 +7414,3 @@ SceneRoots:
- {fileID: 160957285}
- {fileID: 1184862095}
- {fileID: 1663842063}
- {fileID: 3576565829365767112}
@@ -71,7 +71,7 @@ public class BJEventBase : MonoBehaviour
private SitPosData _targetSit; // 目标座位引用
private Coroutine _scoreCoroutine; // 加分协程
protected GameObject _scoreBoard; // 自动创建的分数版(用于移动)—— protected 供子类清理
private BJImage _bjImage; // 分数版上的 BJImage 组件(可选,用于切换金币/银币样式)
protected BJImage _bjImage; // 分数版上的 BJImage 组件(可选,用于切换金币/银币样式)
protected int _activeCoinRoutines; // 正在运行的 CoinArrival 协程数量(protected 供子类兜底检测)
public object obj;
@@ -33,6 +33,9 @@ public class BaoLieJinShaEvent : BJEventBase
/// <summary>是否已触发爆炸(防止重复触发)</summary>
private bool _hasExploded = false;
/// <summary>所有炸死鱼的总金币(用于校正 maxScore)</summary>
private long _totalCoin = 0;
public override void Init(long goldCount, int posID, long paobei, long fishScore, int beishu,
Action<int> action, Action action1 = null)
{
@@ -51,18 +54,17 @@ public class BaoLieJinShaEvent : BJEventBase
StartCoroutine(ExplodeThenScore());
}
/// <summary>爆炸 → 杀鱼 → 加分滚动</summary>
/// <summary>爆炸 → 杀鱼 → 按炸死鱼个数拆红包累分</summary>
private IEnumerator ExplodeThenScore()
{
// 爆炸中心 = Boss 传入的 explosionCenter(爆裂金鲨=鱼移动到的中心0,0)
Vector3 center = explosionCenter;
Debug.Log($"[BaoLieJinSha] 爆炸 位置={center}");
// 爆奖预制体本身就是爆炸特效,已在 Boss 里移到正确位置并激活,这里不再 Instantiate
// 物理圈检测,范围内的鱼走死鱼方法
Vector3 sitPos = GetSeatPosition();
var hits = Physics2D.OverlapCircleAll(center, explosionRadius, fishLayer);
// 收集所有要杀的鱼,统计总金币(用 long 避免截断)
long totalCoin = 0;
int killCount = 0;
foreach (var hit in hits)
{
@@ -71,21 +73,105 @@ public class BaoLieJinShaEvent : BJEventBase
if (monster == null) continue;
if (monster.fishenum != FishTypeEnum.普通鱼) continue;
// 每条鱼的金币 = 炮倍 × 鱼底分
var coinNum = new RedPacketRecord
{
Amount = paoBei * monster.monsterData.fishTypeConfig.fishScore
};
// ⭐ 用 long 计算,避免 int 截断(fishTypeConfig.fishScore 是 long)
long coin = (long)paoBei * monster.monsterData.fishTypeConfig.fishScore;
var coinNum = new RedPacketRecord { Amount = coin };
CreateFishManager.Instance.Id_DieFish_FX(monster.guid, coinNum, sitPos, isSelf);
totalCoin += coin;
killCount++;
}
Debug.Log($"[BaoLieJinSha] 爆炸炸死 {killCount} 条鱼");
Debug.Log($"[BaoLieJinSha] 爆炸炸死 {killCount} 条鱼 总金币={totalCoin}");
// 等爆炸特效播完再进入加分滚动 + 回收
// 没炸到任何鱼:直接进入结束流程(bjEndUI 显示服务端 maxScore)
if (killCount == 0)
{
yield return new WaitForSeconds(explosionDuration);
OnScoreEnd();
yield break;
}
// ⭐ 炸到鱼:按炸死鱼个数拆红包
// maxScore = 所有炸死鱼总金币(覆盖服务端值)
// scoreCount = killCount(红包个数 = 炸死鱼个数)
// totalBJCount = killCount(驱动 CallBJ 自动结束检测)
_totalCoin = totalCoin;
maxScore = (int)totalCoin;
scoreCount = killCount;
totalBJCount = killCount;
// layeredPool 置空,BigPrize 会按新 maxScore 重建
layeredPool = null;
// 等待爆炸特效播放
yield return new WaitForSeconds(explosionDuration);
// 进入加分滚动 → MoveToSit → OnScoreEnd → JiaFen → die(回池)
StartAddScore();
// 按鱼个数逐个 CallBJ 拆红包(每个红包对应一条鱼的金币)
for (int i = 0; i < killCount; i++)
{
CallBJ(minCount: 1, maxCount: 3);
yield return new WaitForSeconds(0.15f);
}
// CallBJ 内部会在 currBJCount >= totalBJCount 时自动触发 EffEnd
// → DelayThenScore → StartAddScore → MoveToSit → OnScoreEnd → JiaFen → die
}
/// <summary>
/// 重写 OnScoreEnd:bjEndUI 直接用 _totalCoin(炸死鱼总金币)显示,
/// 不使用 maxScore(在 AddScoreRoutine 里被 currScore 污染)。
/// </summary>
protected override void OnScoreEnd()
{
if (isScoreEnd) return;
isScoreEnd = true;
// 回加金币到玩家
JiaFen?.Invoke();
// 强制用真实总金币,不信任累加的 currScore
if (_totalCoin > 0)
{
maxScore = (int)Math.Min(_totalCoin, int.MaxValue);
currScore = maxScore;
if (tMP_Score != null)
tMP_Score.text = _totalCoin.ToString();
}
// BJEndUI:直接用 _totalCoin 传给 Init(参数是 long)
if (bjEndUI != null)
{
Vector3 uiPos;
if (useScorePanel)
{
if (_scoreBoard != null)
uiPos = _scoreBoard.transform.position;
else if (tMP_Score != null)
uiPos = tMP_Score.transform.position;
else
uiPos = transform.position;
}
else
{
float y = bjEndUIOffsetY;
if (posID == 2 || posID == 3) y *= -1f;
uiPos = GetSeatPosition() + Vector3.up * y;
}
var endUI = Instantiate(bjEndUI, uiPos, Quaternion.identity, CreateFishManager.Instance.bjEffectRoot);
// ⭐ 直接传 _totalCoin(long),而不是被污染的 maxScore(int)
long displayScore = _totalCoin > 0 ? _totalCoin : maxScore;
endUI.Init(bJbeishu, displayScore, isSelf);
}
// 删除分数面板
if (_scoreBoard != null)
{
Destroy(_scoreBoard);
_scoreBoard = null;
tMP_Score = null;
_bjImage = null;
}
die();
}
/// <summary>回收爆奖预制体到对象池(池化复用)</summary>
@@ -0,0 +1,570 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &2819125516760979150
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1182168779358667, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1216266873135193, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1221258801499569, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1271283814279097, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1301752586837398, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1420988340884470, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1435700687263072, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1507919220135046, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1521056416533664, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1531613835474051, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1549259736363844, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1549259736363844, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1582864439444948, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1628029452789050, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1652794491312824, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Name
value: PW_Bullet_Explosion_Trigger Variant
objectReference: {fileID: 0}
- target: {fileID: 1652794491312824, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1675204435456896, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1734249349150972, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1737224332009143, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1776381959085698, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1798724044864110, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1853820017478953, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1874623465770046, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1892043707122294, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1954049963151781, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4022203061300050, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4022203061300050, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4022203061300050, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4023181742527415, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4023181742527415, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4023181742527415, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4030922813636365, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4030922813636365, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4030922813636365, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4053028229419915, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4053028229419915, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4053028229419915, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4063119241234881, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4063119241234881, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4063119241234881, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4139184691341360, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4271097587177157, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4271097587177157, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4271097587177157, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4317722045236045, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4317722045236045, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4317722045236045, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4325171310588040, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 0.32184
objectReference: {fileID: 0}
- target: {fileID: 4325171310588040, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 0.32184
objectReference: {fileID: 0}
- target: {fileID: 4325171310588040, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 0.32184
objectReference: {fileID: 0}
- target: {fileID: 4325171310588040, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4360569920400241, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4360569920400241, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4360569920400241, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4388204476590121, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4388204476590121, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4388204476590121, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4394932462802309, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4394932462802309, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4394932462802309, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4436241266755310, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4436241266755310, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4436241266755310, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4546651002458332, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4546651002458332, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4546651002458332, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4574214225196653, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4574214225196653, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4574214225196653, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4756404101627002, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4756404101627002, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4756404101627002, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4757037605762943, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4757037605762943, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4757037605762943, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4788107201203195, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4788107201203195, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4788107201203195, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4808666210308903, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 9.5232
objectReference: {fileID: 0}
- target: {fileID: 4808666210308903, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 9.5232
objectReference: {fileID: 0}
- target: {fileID: 4808666210308903, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 9.5232
objectReference: {fileID: 0}
- target: {fileID: 4964309657509270, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4964309657509270, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4964309657509270, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4965280363178913, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4965280363178913, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4965280363178913, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4968025064057891, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.x
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4968025064057891, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.y
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 4968025064057891, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
propertyPath: m_LocalScale.z
value: 3.1744
objectReference: {fileID: 0}
- target: {fileID: 199050257008327921, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199192870337471910, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199224963056076567, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199256050769551685, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199324638933309718, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199359410816363591, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199408944229796506, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199409284694170916, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199636710072693100, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199663159667371570, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199698922031150488, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199707769860217474, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199746559939696485, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199855260921162747, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199855854780077235, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199898709454346414, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199905805999521653, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199917253308308770, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199929511038053681, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199946913929590834, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects:
- {fileID: 1221258801499569, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
- {fileID: 1549259736363844, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 1652794491312824, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
insertIndex: -1
addedObject: {fileID: 7225840926491933304}
m_SourcePrefab: {fileID: 100100000, guid: 208c34b63f5ae9340b85ea500f045428, type: 3}
--- !u!1 &2817657484381883510 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1652794491312824, guid: 208c34b63f5ae9340b85ea500f045428,
type: 3}
m_PrefabInstance: {fileID: 2819125516760979150}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7225840926491933304
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2817657484381883510}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 95bd7f1080a454f45b5fa09cae449455, type: 3}
m_Name:
m_EditorClassIdentifier:
bjEndUI: {fileID: -382508373279050920, guid: 89e6098c952e72848b877480472799f7, type: 3}
useScorePanel: 1
tMP_Score: {fileID: 0}
scorePanelPrefab: {fileID: 1345928542973131, guid: 68cbd28cad4308848b2b96b1cc6d60c4,
type: 3}
currScore: 0
maxScore: 0
scoreCount: 0
posID: 0
paoBei: 0
fishScore: 0
bJbeishu: 0
showDelay: 3
moveDuration: 0.5
moveEase: 6
startOffset: {x: 0, y: 0, z: -100}
bjEndUIOffsetY: 150
coinFlyDuration: 0.5
coinArrivalInterval: 0.1
isSelf: 0
autoFinishOnScoreFull: 1
totalBJCount: 0
currBJCount: 0
isEffEnd: 0
isScoreStart: 0
isScoreEnd: 0
isGoldEffectStart: 0
explosionPrefab: {fileID: 0}
explosionRadius: 20
fishLayer:
serializedVersion: 2
m_Bits: 64
explosionDuration: 2
scoreStartDelay: 0.5
explosionCenter: {x: 0, y: 0, z: 0}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9997246b53fdc874ba44dae84d685b88
guid: a32e03f284a4bb440a9059541f40cfdd
PrefabImporter:
externalObjects: {}
userData:
@@ -1,318 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &7570073009441042985
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1394668104558816, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_Name
value: PW_Effect_Explosion_3 Variant
objectReference: {fileID: 0}
- target: {fileID: 4064689796503745, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4064689796503745, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4064689796503745, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4098224298030642, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4098224298030642, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4098224298030642, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4101279782920465, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4101279782920465, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4101279782920465, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4260973686605039, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4260973686605039, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4260973686605039, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4264709093638479, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4264709093638479, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4264709093638479, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4329358969611587, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4329358969611587, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4329358969611587, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4547247344617271, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4547247344617271, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.2440553
objectReference: {fileID: 0}
- target: {fileID: 4547247344617271, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.2440553
objectReference: {fileID: 0}
- target: {fileID: 4651409315356159, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4651409315356159, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4651409315356159, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4660574491394692, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4660574491394692, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4660574491394692, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 5.244055
objectReference: {fileID: 0}
- target: {fileID: 4666657087034758, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4666657087034758, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4666657087034758, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4749094023316091, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4847567608950697, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.x
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4847567608950697, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.y
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 4847567608950697, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
propertyPath: m_LocalScale.z
value: 6.318138
objectReference: {fileID: 0}
- target: {fileID: 199005299102376408, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199220145131343615, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199246666157525611, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199251983979506965, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199522706815275651, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199523473613910206, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199693679109659873, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199815542360299445, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199824114732805406, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199870772376971908, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199890595866557463, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 1394668104558816, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
insertIndex: -1
addedObject: {fileID: -3320653277893481443}
m_SourcePrefab: {fileID: 100100000, guid: 7ba2d2ea35956b54c86b8d480cde1152, type: 3}
--- !u!1 &7569065783371946697 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1394668104558816, guid: 7ba2d2ea35956b54c86b8d480cde1152,
type: 3}
m_PrefabInstance: {fileID: 7570073009441042985}
m_PrefabAsset: {fileID: 0}
--- !u!114 &-3320653277893481443
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7569065783371946697}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 95bd7f1080a454f45b5fa09cae449455, type: 3}
m_Name:
m_EditorClassIdentifier:
bjEndUI: {fileID: -382508373279050920, guid: 89e6098c952e72848b877480472799f7, type: 3}
useScorePanel: 1
tMP_Score: {fileID: 0}
scorePanelPrefab: {fileID: 0}
currScore: 0
maxScore: 0
scoreCount: 0
posID: 0
paoBei: 0
fishScore: 0
bJbeishu: 0
showDelay: 3
moveDuration: 0.5
moveEase: 6
startOffset: {x: 0, y: 0, z: -100}
bjEndUIOffsetY: 150
coinFlyDuration: 0.5
coinArrivalInterval: 0.1
isSelf: 0
autoFinishOnScoreFull: 1
totalBJCount: 0
currBJCount: 0
isEffEnd: 0
isScoreStart: 0
isScoreEnd: 0
isGoldEffectStart: 0
explosionPrefab: {fileID: 0}
explosionRadius: 5
fishLayer:
serializedVersion: 2
m_Bits: 0
explosionDuration: 2
scoreStartDelay: 0.5
explosionCenter: {x: 0, y: 0, z: 0}
@@ -217,7 +217,7 @@ MonoBehaviour:
currState: 0
HP: 5
effect_Die: {fileID: 0}
effect_DieAward: {fileID: 7569065783371946697, guid: 9997246b53fdc874ba44dae84d685b88,
effect_DieAward: {fileID: 2817657484381883510, guid: a32e03f284a4bb440a9059541f40cfdd,
type: 3}
currEffect_DieAward: {fileID: 0}
isMove: 1
@@ -1,104 +1,294 @@
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
using DG.Tweening;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 黑洞飞船 Boss 爆奖事件(临时通用版)。
///
/// 当前实现:在死亡区域爆炸,范围内普通鱼走 Id_DieFish_FX 死亡。
/// 后续替换:改为放置区域吸收小飞机(留位置待实现)。
/// 黑洞飞船 Boss 爆奖事件(黑洞吞噬模式)。
///
/// 流程:
/// Boss 死亡 → Init → 等待 explosionDelay → 爆炸 → 范围杀鱼 → 加分滚动
/// Boss 死亡 → Init → 黑洞特效激活(在死亡位置)
/// → 持续 blackholeDuration 秒,检测 absorbRadius 范围内的普通鱼
/// → 鱼进入范围后螺旋吸收到中心,每吸收一条通过红包分层算法加一点分
/// → 达到 absorbTargetCount 条或超时 → 结束 → OnScoreEnd → die(回池)
///
/// ⭐ 分数面板位置 = 爆奖位置 + scorePanelOffset(默认上方),不走屏幕正下方。
/// </summary>
public class HeiDongFeiChuanEvent : BJEventBase
{
[Header("爆炸配置(临时通用爆奖)")]
[Tooltip("爆炸特效预制体")]
public GameObject explosionPrefab;
[Tooltip("爆炸检测半径(世界单位)")]
public float explosionRadius = 5f;
[Header("黑洞配置")]
[Tooltip("黑洞持续时间(秒)")]
public float blackholeDuration = 5f;
[Tooltip("需要吞噬的飞机个数")]
public int absorbTargetCount = 10;
[Tooltip("吸收检测半径(碰撞器半径,世界单位)")]
public float absorbRadius = 3f;
[Tooltip("鱼层(Inspector 设 Fish)")]
public LayerMask fishLayer;
[Tooltip("爆炸延迟(Boss 死亡后到爆炸的等待)")]
[Tooltip("Boss 死亡后到黑洞激活的延迟")]
public float explosionDelay = 0.5f;
[Tooltip("爆炸特效持续时间")]
public float explosionDuration = 2f;
[Tooltip("爆炸后到加分的延迟")]
public float scoreStartDelay = 0.5f;
[Header("分数面板位置")]
[Tooltip("分数面板相对爆奖位置的偏移(默认上方)")]
public Vector3 scorePanelOffset = new Vector3(0, 2.5f, 0);
[Header("吸收动画")]
[Tooltip("飞机被吸收的移动时间(秒)")]
public float absorbMoveDuration = 0.6f;
[Tooltip("螺旋旋转速度(度/秒)")]
public float absorbRotateSpeed = 720f;
[Tooltip("每次检测间隔(秒),越小吸收越密集")]
public float absorbCheckInterval = 0.1f;
/// <summary>爆炸中心(世界坐标,由 Boss 传入=死亡位置)</summary>
[HideInInspector]
public Vector3 explosionCenter = Vector3.zero;
// 吸收小飞机区域配置(留位置,后续实现)
[Header("吸收小飞机(预留,暂未实现)")]
[Tooltip("吸收区域预制体")]
public GameObject absorbAreaPrefab;
[Tooltip("吸收半径")]
public float absorbRadius = 8f;
[Tooltip("吸收持续时间")]
public float absorbDuration = 3f;
// 运行时状态
private int _absorbedCount = 0; // 已吸收飞机数
private readonly HashSet<string> _absorbingGuids = new HashSet<string>(); // 正在吸收中的鱼 guid
public override void Init(long goldCount, int posID, long paobei, long fishScore, int beishu,
Action<int> action, Action action1 = null)
{
base.Init(goldCount, posID, paobei, fishScore, beishu, action, action1);
// ApplySeatOffset 会把位置移到屏幕中心,这里恢复到死亡位置
// 重置子类运行时状态(对象池复用安全)
_absorbedCount = 0;
_absorbingGuids.Clear();
// ApplySeatOffset 已重写为空,恢复到 Boss 传入的爆炸中心(死亡位置)
transform.position = explosionCenter;
StartCoroutine(ExplodeThenScore());
// ⭐ 分数面板位置 = 爆奖位置 + 偏移(默认上方),不走屏幕正下方
PositionScorePanel();
// 红包分层池:总分 maxScore,分成 absorbTargetCount 份(每吸收一条取一份)
scoreCount = absorbTargetCount;
StartCoroutine(BlackholeRoutine());
}
/// <summary>设置分数面板位置到爆奖特效上方(UI 坐标,由世界坐标转换得到)</summary>
private void PositionScorePanel()
{
if (_scoreBoard == null && tMP_Score == null) return;
// 分数面板是 UI(挂在 Canvas 下),爆奖特效是 2D 世界坐标
// 需要把世界坐标 explosionCenter 转成 UI 坐标,再加上偏移量
Canvas canvas = null;
if (_scoreBoard != null)
canvas = _scoreBoard.GetComponentInParent<Canvas>();
else if (tMP_Score != null)
canvas = tMP_Score.GetComponentInParent<Canvas>();
if (canvas == null)
{
// 兜底:找不到 Canvas,直接用世界坐标(效果可能不准但不报错)
Vector3 fallbackPos = explosionCenter + scorePanelOffset;
if (_scoreBoard != null) _scoreBoard.transform.position = fallbackPos;
else if (tMP_Score != null && tMP_Score.transform.parent != null)
tMP_Score.transform.parent.position = fallbackPos;
return;
}
// 世界坐标 → Canvas 局部坐标
Vector2 canvasLocalPos = CoordinateTransformation.WorldPos_ToCanvas(explosionCenter, canvas);
// 加上 UI 偏移量
Vector2 finalPos = canvasLocalPos + (Vector2)scorePanelOffset;
if (_scoreBoard != null)
{
var rt = _scoreBoard.GetComponent<RectTransform>();
if (rt != null) rt.anchoredPosition = finalPos;
}
else if (tMP_Score != null && tMP_Score.transform.parent != null)
{
var rt = tMP_Score.transform.parent.GetComponent<RectTransform>();
if (rt != null) rt.anchoredPosition = finalPos;
}
}
/// <summary>重写:不移动到屏幕中心,但缓存座位引用(供 isSelf 判断使用)</summary>
protected override void ApplySeatOffset()
{
// 不调用 base.ApplySeatOffset(),避免位置被移到屏幕中心 (0,0,-100)
// 但需要设置 _targetSit,否则 Init 里 isSelf 判断会失败
// 只缓存 _targetSit,让 Init 里 isSelf 判断正常工作
GetSeatPosition();
}
/// <summary>爆炸 → 杀鱼 → 加分滚动</summary>
private IEnumerator ExplodeThenScore()
/// <summary>重写 MoveToSit:分数面板在黑洞位置原地结束,不飞回座位</summary>
public override void MoveToSit()
{
// 短暂停留后直接结束(让玩家看清最终分数)
DOVirtual.DelayedCall(0.8f, () => OnScoreEnd());
}
/// <summary>
/// 重写 OnScoreEnd:bjEndUI 仍然定位在炮台上方(保持原行为),
/// 不跟随分数面板位置(分数面板在黑洞上方)。
/// </summary>
protected override void OnScoreEnd()
{
if (isScoreEnd) return;
isScoreEnd = true;
// 回加金币到玩家
JiaFen?.Invoke();
// bjEndUI 定位在炮台上方(保持原行为,不跟随分数面板)
if (bjEndUI != null)
{
float y = bjEndUIOffsetY;
if (posID == 2 || posID == 3) y *= -1f;
Vector3 uiPos = GetSeatPosition() + Vector3.up * y;
var endUI = Instantiate(bjEndUI, uiPos, Quaternion.identity, CreateFishManager.Instance.bjEffectRoot);
endUI.Init(bJbeishu, maxScore, isSelf);
}
// 删除分数面板
if (_scoreBoard != null)
{
Destroy(_scoreBoard);
_scoreBoard = null;
tMP_Score = null;
_bjImage = null;
}
// 销毁爆奖对象自身
die();
}
// ==================== 黑洞主循环 ====================
private IEnumerator BlackholeRoutine()
{
// 等待 Boss 死亡动画结束
yield return new WaitForSeconds(explosionDelay);
// 爆炸中心 = Boss 传入的死亡位置
Vector3 center = explosionCenter;
Debug.Log($"[HeiDongFeiChuan] 爆炸 位置={center}");
Debug.Log($"[HeiDongFeiChuan] 黑洞激活 位置={explosionCenter} 目标吞噬={absorbTargetCount} 持续={blackholeDuration}s maxScore={maxScore}");
// 爆奖预制体本身就是爆炸特效,已在死亡位置创建并激活,这里不再 Instantiate
float timer = 0f;
float checkTimer = 0f;
while (timer < blackholeDuration && _absorbedCount < absorbTargetCount)
{
timer += Time.deltaTime;
checkTimer += Time.deltaTime;
// 物理圈检测,范围内的普通鱼走死鱼方法
Vector3 sitPos = GetSeatPosition();
var hits = Physics2D.OverlapCircleAll(center, explosionRadius, fishLayer);
int killCount = 0;
// 按间隔批量检测吸收(一次吸一堆)
if (checkTimer >= absorbCheckInterval)
{
checkTimer = 0f;
CheckAbsorb();
}
yield return null;
}
Debug.Log($"[HeiDongFeiChuan] 黑洞结束 已吸收={_absorbedCount}/{absorbTargetCount} 超时={timer >= blackholeDuration}");
EndBlackhole();
}
/// <summary>检测范围内普通鱼,批量触发吸收(一次吸所有在范围内的鱼)</summary>
private void CheckAbsorb()
{
if (_absorbedCount + _absorbingGuids.Count >= absorbTargetCount) return;
var hits = Physics2D.OverlapCircleAll(transform.position, absorbRadius, fishLayer);
foreach (var hit in hits)
{
if (!hit.CompareTag("Fish")) continue;
var monster = hit.GetComponentInParent<MonsterContral>();
if (monster == null) continue;
if (monster.fishenum != FishTypeEnum.普通鱼) continue;
if (_absorbingGuids.Contains(monster.guid)) continue;
// 每条鱼的金币 = 炮倍 × 鱼底分
var coinNum = new RedPacketRecord
{
Amount = paoBei * monster.monsterData.fishTypeConfig.fishScore
};
CreateFishManager.Instance.Id_DieFish_FX(monster.guid, coinNum, sitPos, isSelf);
killCount++;
_absorbingGuids.Add(monster.guid);
StartCoroutine(AbsorbFish(monster));
}
Debug.Log($"[HeiDongFeiChuan] 爆炸炸死 {killCount} 条鱼");
}
// 等爆炸特效播完再进入加分滚动 + 回收
yield return new WaitForSeconds(explosionDuration);
/// <summary>螺旋吸收飞机:停移动 → 螺旋到中心 → 加分 → 回收</summary>
private IEnumerator AbsorbFish(MonsterContral fish)
{
// 停止鱼的移动
fish.isMove = false;
// 进入加分滚动 → MoveToSit → OnScoreEnd → JiaFen → die(回池)
Vector3 center = transform.position;
Vector3 toFish = fish.transform.position - center;
float startDist = toFish.magnitude;
float startAngle = Mathf.Atan2(toFish.y, toFish.x);
float timer = 0f;
while (timer < absorbMoveDuration)
{
// 鱼可能被其他逻辑销毁
if (fish == null || fish.gameObject == null) yield break;
timer += Time.deltaTime;
float t = timer / absorbMoveDuration;
// 螺旋移动:半径从 startDist → 0,角度持续旋转
float r = startDist * (1f - t);
float theta = startAngle + timer * absorbRotateSpeed * Mathf.Deg2Rad;
fish.transform.position = center + new Vector3(Mathf.Cos(theta) * r, Mathf.Sin(theta) * r, 0f);
yield return null;
}
// 吸收完成
_absorbedCount++;
_absorbingGuids.Remove(fish.guid);
// 通过红包算法加一点点分(从 maxScore 中分一份)
AbsorbAddScore();
// 回收鱼(不播死亡特效)
if (fish != null && fish.gameObject != null)
{
CreateFishManager.Instance.Id_DieFish_NotFX(fish.guid);
}
}
/// <summary>每吸收一条飞机,从红包分层池取一份加到 currScore</summary>
private void AbsorbAddScore()
{
if (layeredPool == null)
layeredPool = new LayeredPool(maxScore, absorbTargetCount > 0 ? absorbTargetCount : 1);
// 每次取 1 个红包
var records = layeredPool.BossGlodCoinRandrom(transform.position, 1, 1, posID);
if (records != null && records.Count > 0)
{
foreach (var r in records)
{
currScore += (int)r.Amount;
if (tMP_Score != null)
tMP_Score.text = currScore.ToString();
}
Debug.Log($"[HeiDongFeiChuan] 吸收第 {_absorbedCount} 条 加分={records[0].Amount} currScore={currScore}/{maxScore}");
}
}
/// <summary>黑洞结束:确保最终分数 = maxScore,进入结束流程</summary>
private void EndBlackhole()
{
// 红包可能没全部分完,剩余的一次性加上
if (currScore < maxScore)
{
int remain = maxScore - currScore;
currScore = maxScore;
if (tMP_Score != null)
tMP_Score.text = maxScore.ToString();
Debug.Log($"[HeiDongFeiChuan] 补齐剩余分数 remain={remain} final={currScore}");
}
// 进入加分滚动 → MoveToSit(重写为原地停留)→ OnScoreEnd → die
StartAddScore();
}
/// <summary>回收爆奖预制体到对象池(先清理分数面板,防止泄漏)</summary>
/// <summary>回收爆奖预制体到对象池</summary>
public override void die()
{
CleanupBeforeDie();
@@ -10,39 +10,39 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 1007337123540318, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1144356583338513, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1146417661668246, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1153207639344144, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1236221432825909, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1236721107716246, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1298214314709604, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1309580754744221, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1394044592409426, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1441338820312778, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Name
@@ -50,47 +50,47 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1441338820312778, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1520255662087614, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1523291246856968, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1541892067980253, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1569344654093265, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1576547912495248, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1782899052148796, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1888156297624890, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1919727853707538, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1932109434995121, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1950399686465498, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_Layer
value: 9
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4000383585559312, guid: 4aa979742d1840647bb9aa05b197b4fa, type: 3}
propertyPath: m_LocalScale.x
@@ -566,15 +566,14 @@ MonoBehaviour:
isScoreStart: 0
isScoreEnd: 0
isGoldEffectStart: 0
explosionPrefab: {fileID: 0}
explosionRadius: 5
blackholeDuration: 5
absorbTargetCount: 10
absorbRadius: 8
fishLayer:
serializedVersion: 2
m_Bits: 64
explosionDelay: 0.5
explosionDuration: 2
scoreStartDelay: 0.5
scorePanelOffset: {x: 0, y: 2.5, z: 0}
absorbMoveDuration: 0.6
absorbRotateSpeed: 720
explosionCenter: {x: 0, y: 0, z: 0}
absorbAreaPrefab: {fileID: 0}
absorbRadius: 8
absorbDuration: 3
@@ -12,6 +12,10 @@ PrefabInstance:
propertyPath: m_Name
value: PW_Enemy_5000
objectReference: {fileID: 0}
- target: {fileID: 1404419623376755, guid: dc96b58c5624d4a4c81915c1a96c1d2e, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4316826217363421, guid: dc96b58c5624d4a4c81915c1a96c1d2e, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@@ -82,6 +86,12 @@ PrefabInstance:
insertIndex: -1
addedObject: {fileID: -5946957508908904149}
m_SourcePrefab: {fileID: 100100000, guid: dc96b58c5624d4a4c81915c1a96c1d2e, type: 3}
--- !u!1 &7116783468747611323 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1086258123229383, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
type: 3}
m_PrefabInstance: {fileID: 7115756860522828924}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7116879987934780694 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1129806422034794, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
@@ -166,23 +176,69 @@ MonoBehaviour:
v3: {x: 0, y: 0, z: 0}
isLocalCoin: 0
killerSitPos: -1
MoveEffectPrefab: {fileID: 7117195415159380717}
ExpectoPatronumEffectPrefab: {fileID: 7117214045987354522}
EruptEffectPrefab: {fileID: 7116783468747611323}
smallExplosionEffectPrefab: {fileID: 7117594478996822143}
explosionEffectPrefab: {fileID: 7117342578956353583}
attackEffectPrefab: {fileID: 7117516399533122076}
effectSelfAddSource: {fileID: 2692461694294559074, guid: de5f4b647b4a31f4e9a6fa58dfeddb75,
type: 3}
effectOtherAddSource: {fileID: 1800583966427392384, guid: bf5cb5268d2a7db4488bd300183711aa,
type: 3}
addSourceSpawnRate: 100
addSourceDuration: 1
addSourceLifetime: 1.5
currAnimType: 0
skeletonAnim: {fileID: 7157686033157235909}
legacyAnim: {fileID: 0}
animatorComp: {fileID: 0}
appearAnimName: In
moveAnimName: stand
dieAnimName: attack
attackAnimName: attack
leaveAnimName: out
animatorAppearTrigger: Appear
animatorMoveTrigger: Move
animatorDieTrigger: Die
animatorAttackTrigger: Attack
animatorLeaveTrigger: Leave
appearAnimDuration: 1
dieAnimDuration: 1.5
leaveAnimDuration: 1.5
dieTargetPosition: {x: 0, y: 0, z: 0}
dieMoveEase: 7
dieMoveDuration: 1.5
dieEffectDuration: 1
centerWaitDuration: 1.5
attackDuration: 2
--- !u!1 &7117195415159380717 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1518066628169361, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
type: 3}
m_PrefabInstance: {fileID: 7115756860522828924}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7117214045987354522 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1499041078453222, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
type: 3}
m_PrefabInstance: {fileID: 7115756860522828924}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7117342578956353583 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1651965368456275, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
type: 3}
m_PrefabInstance: {fileID: 7115756860522828924}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7117516399533122076 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1759619893655136, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
type: 3}
m_PrefabInstance: {fileID: 7115756860522828924}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7117594478996822143 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1963032592780291, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
type: 3}
m_PrefabInstance: {fileID: 7115756860522828924}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7157686033157235909 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114009115652501689, guid: dc96b58c5624d4a4c81915c1a96c1d2e,
@@ -1,27 +1,18 @@
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
using System;
using System.Collections;
using UnityEngine;
/// <summary>
/// 破坏球 Boss 爆奖事件(通用爆炸模式)。
/// 破坏球 Boss 爆奖事件(Boss 控制流程模式)。
///
/// 流程:
/// Boss 死亡动画 + 移动到中心 → Init → 等待 explosionDelay → 范围杀鱼 → 爆炸特效播完 → 加分滚动 → 回池
/// 爆奖预制体本身就是爆炸特效,在中心位置创建。
/// 与通用爆奖不同:Boss 完全控制流程时序(死亡特效→护盾→移动→攻击→离开),
/// Event 只负责:
/// 1. Init 时创建分数面板并显示 maxScore
/// 2. Boss 离开动画结束后调用 EndExplosion() → OnScoreEnd → 创建 bjEndUI → die(回池)
///
/// 不自动启动爆炸杀鱼协程,不自动触发 EffEnd/StartAddScore。
/// </summary>
public class PoHuaiQiuEvent : BJEventBase
{
[Header("爆炸配置")]
[Tooltip("爆炸检测半径(世界单位)")]
public float explosionRadius = 5f;
[Tooltip("鱼层(Inspector 设 Fish)")]
public LayerMask fishLayer;
[Tooltip("爆炸延迟(Boss 死亡后到爆炸的等待)")]
public float explosionDelay = 0.5f;
[Tooltip("爆炸特效持续时间(播完后才进入加分并回收)")]
public float explosionDuration = 2f;
/// <summary>爆炸中心(世界坐标,由 Boss 传入=中心位置 dieTargetPosition)</summary>
[HideInInspector]
public Vector3 explosionCenter = Vector3.zero;
@@ -30,65 +21,59 @@ public class PoHuaiQiuEvent : BJEventBase
Action<int> action, Action action1 = null)
{
base.Init(goldCount, posID, paobei, fishScore, beishu, action, action1);
// ApplySeatOffset 已重写为空,这里恢复到 Boss 传入的爆炸中心(中心位置)
// 定位到 Boss 传入的中心位置
transform.position = explosionCenter;
StartCoroutine(ExplodeThenScore());
// 直接显示最终分数(不滚动,Boss 控制时序)
if (tMP_Score != null)
tMP_Score.text = maxScore.ToString();
}
/// <summary>重写:不移动到屏幕中心,但缓存座位引用(供 isSelf 判断和 MoveToSit 使用)</summary>
/// <summary>重写:不移动到屏幕中心,只缓存座位引用(供 isSelf 判断使用)</summary>
protected override void ApplySeatOffset()
{
// 不调用 base.ApplySeatOffset(),避免位置被移到屏幕中心 (0,0,-100)
// 但需要设置 _targetSit,否则 Init 里 isSelf 判断会失败(导致金/银币样式错误)
GetSeatPosition();
}
/// <summary>爆炸 → 杀鱼 → 加分滚动</summary>
private IEnumerator ExplodeThenScore()
/// <summary>
/// Boss 离开动画结束后调用:创建 bjEndUI 并结束爆奖。
/// bjEndUI 定位在炮台上方(不跟随分数面板位置)。
/// </summary>
public void EndExplosion()
{
// 等待 Boss 死亡动画 + 移动到中心完成
yield return new WaitForSeconds(explosionDelay);
if (isScoreEnd) return;
isScoreEnd = true;
// 爆炸中心 = Boss 传入的中心位置
Vector3 center = explosionCenter;
Debug.Log($"[PoHuaiQiu] 爆炸 位置={center}");
// 回加金币到玩家
JiaFen?.Invoke();
// 爆奖预制体本身就是爆炸特效,已在中心位置创建并激活,这里不再 Instantiate
// 物理圈检测,范围内的普通鱼走死鱼方法
Vector3 sitPos = GetSeatPosition();
var hits = Physics2D.OverlapCircleAll(center, explosionRadius, fishLayer);
int killCount = 0;
foreach (var hit in hits)
// bjEndUI 定位在炮台上方
if (bjEndUI != null)
{
if (!hit.CompareTag("Fish")) continue;
var monster = hit.GetComponentInParent<MonsterContral>();
if (monster == null) continue;
if (monster.fishenum != FishTypeEnum.普通鱼) continue;
float y = bjEndUIOffsetY;
if (posID == 2 || posID == 3) y *= -1f;
Vector3 uiPos = GetSeatPosition() + Vector3.up * y;
// 每条鱼的金币 = 炮倍 × 鱼底分
var coinNum = new RedPacketRecord
{
Amount = paoBei * monster.monsterData.fishTypeConfig.fishScore
};
CreateFishManager.Instance.Id_DieFish_FX(monster.guid, coinNum, sitPos, isSelf);
killCount++;
var endUI = Instantiate(bjEndUI, uiPos, Quaternion.identity, CreateFishManager.Instance.bjEffectRoot);
endUI.Init(bJbeishu, maxScore, isSelf);
}
Debug.Log($"[PoHuaiQiu] 爆炸炸死 {killCount} 条鱼");
// 等爆炸特效播完再进入加分滚动 + 回收
yield return new WaitForSeconds(explosionDuration);
// 删除分数面板
if (_scoreBoard != null)
{
Destroy(_scoreBoard);
_scoreBoard = null;
tMP_Score = null;
_bjImage = null;
}
// 进入加分滚动 → MoveToSit → OnScoreEnd → JiaFen → die(回池)
StartAddScore();
die();
}
/// <summary>回收爆奖预制体到对象池(先清理分数面板,防止泄漏)</summary>
public override void die()
{
// ⭐ 先清理分数面板和协程(基类 CleanupBeforeDie 会 Destroy _scoreBoard + StopAllCoroutines)
// _scoreBoard 是 EnsureScoreBoard 在 subPanelParent 下 Instantiate 的独立物体,
// 不随 Event 一起 Return,必须显式销毁,否则面板残留
CleanupBeforeDie();
EffectPool.Instance.Return(gameObject);
}
@@ -5,22 +5,20 @@ using Spine.Unity;
using System;
using System.Collections;
using UnityEngine;
using Random = UnityEngine.Random;
/// <summary>
/// 破坏球 Boss。
/// 四阶段 Spine 动画:出现 → 移动 → 死亡爆奖 → 离开。
/// 完整流程:出现 → 移动(待机) → 死亡特效 → 护盾+喷发 → 移动到中心 → 等待 → 攻击 → 离开 → 回收+bjEndUI
///
/// 流程:
/// 1. OnEnable:播放 appear 动画(非循环),期间不移动
/// 2. appear 完成:播放 move 动画(循环),开始沿路径移动
/// 3. DieFish:播放 die 动画(非循环)+ 同时移动到中心 (0,0)
/// 4. 到达中心后触发爆奖事件(PoHuaiQiuEvent 在中心爆炸 + 范围杀鱼 + 加分)
/// 5. 爆奖触发后播放 leave 动画(非循环),动画结束即回收 Boss 本体
/// 爆奖预制体(PoHuaiQiuEvent)独立运行爆炸→加分→回池流程
/// 特效管理:
/// MoveEffectPrefab — 待机/攻击时显示(出现、离开时隐藏)
/// smallExplosionEffectPrefab + explosionEffectPrefab — 死亡时播放 fx1+fx2
/// ExpectoPatronumEffectPrefab + EruptEffectPrefab — 护盾+喷发,移动到中心时显示
/// attackEffectPrefab — 攻击阶段显示
/// </summary>
public class PoHuaiQiu_BOSS : MonsterControl_BossBase
{
// ==================== 动画方式 ====================
public enum PHQAnimType
{
skeletonAnimation = 0, // Spine
@@ -28,82 +26,123 @@ public class PoHuaiQiu_BOSS : MonsterControl_BossBase
animator = 2 // Animator
}
[Header("特效引用(直接挂在 Boss 预制体子物体上,通过 SetActive 控制)")]
public GameObject MoveEffectPrefab; // 待机/攻击时显示
public GameObject ExpectoPatronumEffectPrefab; // 护盾(攻击前播放)
public GameObject EruptEffectPrefab; // 喷发(攻击前播放)
public GameObject smallExplosionEffectPrefab; // 死亡特效 fx1
public GameObject explosionEffectPrefab; // 死亡特效 fx2
public GameObject attackEffectPrefab; // 攻击特效
[Header("加分飘字特效(UI,攻击阶段持续克隆)")]
public GameObject effectSelfAddSource; // 自己爆奖用
public GameObject effectOtherAddSource; // 非自己爆奖用
[Tooltip("每秒克隆数量(密度)")]
public int addSourceSpawnRate = 30;
[Tooltip("加分特效持续创建时间(秒)")]
public float addSourceDuration = 1f;
[Tooltip("每个克隆体的存活时间(秒)")]
public float addSourceLifetime = 1.5f;
[Header("动画方式")]
[Tooltip("选择动画播放方式")]
public PHQAnimType currAnimType = PHQAnimType.skeletonAnimation;
[Header("动画组件")]
[Tooltip("Spine 组件,留空则用继承的 skeleton 字段")]
public SkeletonAnimation skeletonAnim;
[Tooltip("旧版 Animation 组件")]
public Animation legacyAnim;
[Tooltip("Animator 组件")]
public Animator animatorComp;
[Header("动画名 - Spine / Animation")]
public string appearAnimName = "appear"; // 出现动画
public string moveAnimName = "move"; // 移动动画
public string dieAnimName = "die"; // 死亡爆奖动画
public string leaveAnimName = "leave"; // 离开动画
public string appearAnimName = "appear";
public string moveAnimName = "move";
public string attackAnimName = "attack"; // 攻击动画(循环)
public string leaveAnimName = "leave";
[Header("动画名 - Animator 触发器")]
public string animatorAppearTrigger = "Appear";
public string animatorMoveTrigger = "Move";
public string animatorDieTrigger = "Die";
public string animatorAttackTrigger = "Attack";
public string animatorLeaveTrigger = "Leave";
[Header("动画时长")]
[Tooltip("出现动画播放时长(播完后才开始移动)")]
[Tooltip("出现动画播放时长")]
public float appearAnimDuration = 1f;
[Tooltip("死亡动画播放时长(期间移动到中心,播完后触发爆奖)")]
public float dieAnimDuration = 1.5f;
[Tooltip("离开动画时长(仅 Animation/Animator 模式作为回收 fallback;Spine 模式用 Complete 事件精确触发)")]
[Tooltip("离开动画时长(Animation/Animator 模式 fallback;Spine 用 Complete 事件)")]
public float leaveAnimDuration = 1.5f;
[Header("死亡爆奖")]
[Tooltip("死亡爆奖时移动到的中心位置(世界坐标)")]
[Header("死亡爆奖流程")]
[Tooltip("死亡目标位置(世界坐标,默认中心 0,0)")]
public Vector3 dieTargetPosition = Vector3.zero;
[Tooltip("移动到中心的缓动曲线")]
public Ease dieMoveEase = Ease.InOutQuad;
[Tooltip("移动到中心的时间")]
public float dieMoveDuration = 1.5f;
[Tooltip("死亡特效 fx1+fx2 播放时间")]
public float dieEffectDuration = 1f;
[Tooltip("到达中心后等待时间(1-2秒)")]
public float centerWaitDuration = 1.5f;
[Tooltip("攻击阶段持续时间(秒)")]
public float attackDuration = 2f;
/// <summary>出现动画是否已完成(未完成时不移动、不播移动动画)</summary>
// ==================== 运行时状态 ====================
private bool _isAppearComplete = false;
/// <summary>待激活的爆奖预制体(CreateFishManager 创建后由回调捕获)</summary>
private GameObject _pendingEffectObj;
/// <summary>击杀通知(DieFish 时保存,爆奖触发时使用)</summary>
private RoomKillNotice _killNotice;
/// <summary>出现→移动协程引用(死亡时停止)</summary>
private Coroutine _appearCoroutine;
/// <summary>离开动画是否已触发回收(防止 Complete 事件重复触发)</summary>
private bool _isLeaveRecycled = false;
// ==================== 特效引用(直接引用 Inspector 赋值的子物体) ====================
// 不再 Instantiate,通过 SetActive 控制显隐
private GameObject _moveEffect;
private GameObject _shieldEffect;
private GameObject _eruptEffect;
private GameObject _smallExplosionEffect;
private GameObject _explosionEffect;
private GameObject _attackEffect;
// ============================================================
// 生命周期
// ============================================================
public override void OnEnable()
{
base.OnEnable();
// 重置状态(避免对象池复用残留)
// ⭐ OnEnable 初始化:重置所有状态(对象池复用安全)
_isAppearComplete = false;
_pendingEffectObj = null;
_killNotice = null;
_appearCoroutine = null;
_isLeaveRecycled = false;
// 清理残留 DOTween
transform.DOKill();
StopAllCoroutines();
// 初始化特效实例(首次 Instantiate,复用时重用)
InitEffects();
// 初始可见性:只显示 MoveEffect,其他全部隐藏
SetMoveEffectVisible(false); // 出现阶段先隐藏
SetEffectActive(_shieldEffect, false);
SetEffectActive(_eruptEffect, false);
SetEffectActive(_smallExplosionEffect, false);
SetEffectActive(_explosionEffect, false);
SetEffectActive(_attackEffect, false);
// 播放出现动画
PlayAppearAnim();
// 出现动画完成后切换到移动动画 + 开始移动
// 出现动画完成 → 切换移动动画 + 开始移动
_appearCoroutine = StartCoroutine(AppearToMove());
}
/// <summary>出现动画完成 → 播放移动动画 + 允许移动</summary>
/// <summary>出现动画完成 → 播放移动动画 + 显示 MoveEffect + 允许移动</summary>
private IEnumerator AppearToMove()
{
yield return new WaitForSeconds(appearAnimDuration);
_isAppearComplete = true;
SetMoveEffectVisible(true); // 出现完成,进入待机/移动状态
PlayMoveAnim();
Debug.Log("[PoHuaiQiu] 出现动画完成,开始移动");
}
@@ -115,18 +154,22 @@ public class PoHuaiQiu_BOSS : MonsterControl_BossBase
base.OnMoveUpdata();
}
/// <summary>移动状态进入:出现动画未完成时不播放移动动画(由 AppearToMove 控制)</summary>
/// <summary>移动状态进入:出现动画未完成时不播放移动动画</summary>
public override void OnMoveEnter()
{
if (!_isAppearComplete) return;
PlayMoveAnim();
}
// ============================================================
// 死亡流程
// ============================================================
public override void DieFish(RoomKillNotice obj = null)
{
base.DieFish(obj);
// 停止出现→移动协程(防止死亡时还在播出现动画)
// 停止出现→移动协程
if (_appearCoroutine != null)
{
StopCoroutine(_appearCoroutine);
@@ -139,77 +182,278 @@ public class PoHuaiQiu_BOSS : MonsterControl_BossBase
_killNotice = obj;
// 捕获爆奖预制体引用(CreateFishManager 创建后调用此回调)
// 捕获爆奖预制体引用
action_effect_DieAward = (o) =>
{
_pendingEffectObj = o;
Debug.Log($"[PoHuaiQiu] 捕获爆奖预制体 位置={o.transform.position}");
};
// 开始 死亡 → 爆奖 → 离开 → 回收 流程
// 开始完整死亡流程
StartCoroutine(DieExplodeLeave());
}
/// <summary>死亡动画 + 移动到中心 → 触发爆奖 → 离开动画(结束即回收)</summary>
/// <summary>
/// 完整死亡流程:
/// 死亡特效(fx1+fx2) → 护盾+喷发 → 移动到中心 → 等待 → 攻击特效+攻击动画 → 离开动画 → 回收+bjEndUI
/// </summary>
private IEnumerator DieExplodeLeave()
{
// 1. 播放死亡动画 + 同时移动到中心
PlayDieAnim();
// === Phase 1: 死亡特效 fx1 + fx2 ===
SetMoveEffectVisible(false); // 死亡状态隐藏 MoveEffect
SetEffectActive(_smallExplosionEffect, true);
SetEffectActive(_explosionEffect, true);
Debug.Log("[PoHuaiQiu] Phase 1: 播放死亡特效 fx1+fx2");
yield return new WaitForSeconds(dieEffectDuration);
// === Phase 2: 护盾 + 喷发,移动到中心 ===
SetEffectActive(_smallExplosionEffect, false);
SetEffectActive(_explosionEffect, false);
SetEffectActive(_shieldEffect, true);
SetEffectActive(_eruptEffect, true);
Debug.Log("[PoHuaiQiu] Phase 2: 护盾+喷发,移动到中心");
transform.DOKill();
transform.DOMove(dieTargetPosition, dieAnimDuration).SetEase(dieMoveEase);
Debug.Log($"[PoHuaiQiu] 播放死亡动画,移动到中心 {dieTargetPosition}");
transform.DOMove(dieTargetPosition, dieMoveDuration).SetEase(dieMoveEase);
yield return new WaitForSeconds(dieMoveDuration);
// 等待死亡动画 + 移动完成
yield return new WaitForSeconds(dieAnimDuration);
// === Phase 3: 到达中心,等待 ===
Debug.Log($"[PoHuaiQiu] Phase 3: 到达中心 {dieTargetPosition},等待 {centerWaitDuration}s");
yield return new WaitForSeconds(centerWaitDuration);
// 2. 到达中心后触发爆奖事件(在中心位置爆炸 + 范围杀鱼 + 加分)
if (_pendingEffectObj != null && _killNotice != null)
{
foreach (var item in CreateFishManager.Instance.currGameType.list_Sits)
{
if (item.user == _killNotice.userId)
{
var v = _pendingEffectObj.GetComponent<BJEventBase>();
// === Phase 4: 攻击特效 + 循环攻击动画 ===
SetEffectActive(_shieldEffect, false);
SetEffectActive(_eruptEffect, false);
SetMoveEffectVisible(true); // "待机攻击都显示"
SetEffectActive(_attackEffect, true);
PlayAttackAnim();
Debug.Log("[PoHuaiQiu] Phase 4: 攻击阶段开始");
// 先设置爆炸中心(中心位置),再 Init
var evt = v as PoHuaiQiuEvent;
if (evt != null)
{
evt.explosionCenter = dieTargetPosition;
Debug.Log($"[PoHuaiQiu] 设置爆炸中心(中心位置)={dieTargetPosition}");
}
// 触发爆奖事件 Init(显示分数面板)
TriggerEventInit();
v.Init(
_killNotice.gold, // goldCount
item.posID, // posID(击杀者座位)
_killNotice.skillsGold, // paobei(炮倍)
_killNotice.fishScore, // fishScore(底分)
_killNotice.beishu, // beishu(总倍数)
JiaFen, // action<int>(加分回调)
() => { v.obj = _killNotice.param; } // 服务端爆奖参数
);
}
}
}
// 启动加分飘字协程(攻击阶段持续克隆)
StartCoroutine(SpawnAddSourceRoutine());
// 3. 播放离开动画(动画结束由 Complete 事件触发回收,不再固定等待)
yield return new WaitForSeconds(attackDuration);
// === Phase 5: 离开动画 ===
SetMoveEffectVisible(false); // 离开时隐藏
SetEffectActive(_attackEffect, false);
Debug.Log("[PoHuaiQiu] Phase 5: 播放离开动画");
PlayLeaveAnim();
Debug.Log("[PoHuaiQiu] 播放离开动画,结束后自动回收");
}
/// <summary>离开动画完成回调:立即回收 Boss 本体</summary>
/// <summary>触发爆奖事件 Init(分数面板显示,JiaFen 回调设置)</summary>
private void TriggerEventInit()
{
if (_pendingEffectObj == null || _killNotice == null) return;
foreach (var item in CreateFishManager.Instance.currGameType.list_Sits)
{
if (item.user == _killNotice.userId)
{
var v = _pendingEffectObj.GetComponent<BJEventBase>();
var evt = v as PoHuaiQiuEvent;
if (evt != null)
{
evt.explosionCenter = dieTargetPosition;
}
v.Init(
_killNotice.gold,
item.posID,
_killNotice.skillsGold,
_killNotice.fishScore,
_killNotice.beishu,
JiaFen,
() => { v.obj = _killNotice.param; }
);
break;
}
}
}
/// <summary>离开动画完成回调:回收 Boss + 触发 bjEndUI</summary>
private void OnLeaveAnimComplete()
{
if (_isLeaveRecycled) return;
_isLeaveRecycled = true;
Debug.Log("[PoHuaiQiu] 离开动画结束,回收 Boss + 创建 bjEndUI");
// 触发爆奖结束(创建 bjEndUI)
if (_pendingEffectObj != null)
{
var evt = _pendingEffectObj.GetComponent<PoHuaiQiuEvent>();
if (evt != null)
evt.EndExplosion();
}
// 回收 Boss 本体
CreateFishManager.Instance.Id_DieFish_NotFX(guid);
Debug.Log("[PoHuaiQiu] 离开动画结束,Boss 已回收");
}
// ============================================================
#region 动画播放(三种方式)
// 特效管理(激活/不激活模式,不克隆)
// ============================================================
/// <summary>
/// 初始化所有特效引用。
/// ⭐ 不克隆:特效直接挂在 Boss 预制体子物体上,Inspector 赋值,这里只缓存引用。
/// </summary>
private void InitEffects()
{
_moveEffect = MoveEffectPrefab;
_shieldEffect = ExpectoPatronumEffectPrefab;
_eruptEffect = EruptEffectPrefab;
_smallExplosionEffect = smallExplosionEffectPrefab;
_explosionEffect = explosionEffectPrefab;
_attackEffect = attackEffectPrefab;
}
/// <summary>
/// 设置特效可见性。
/// 激活时重播 ParticleSystem 和 Animator(从开头播放,避免对象池复用后不重播)。
/// </summary>
private void SetEffectActive(GameObject effect, bool active)
{
if (effect == null) return;
if (active)
{
effect.SetActive(true);
ReplayEffect(effect);
}
else
{
effect.SetActive(false);
}
}
/// <summary>重播特效:重置所有 ParticleSystem 和 Animator</summary>
private void ReplayEffect(GameObject effect)
{
// 重置 ParticleSystem
var particles = effect.GetComponentsInChildren<ParticleSystem>(true);
foreach (var ps in particles)
{
ps.Clear();
ps.Play();
}
// 重置 Animator(从默认状态开始)
var animators = effect.GetComponentsInChildren<Animator>(true);
foreach (var anim in animators)
{
anim.Rebind();
anim.Update(0f);
}
}
/// <summary>设置 MoveEffect 可见性</summary>
private void SetMoveEffectVisible(bool visible)
{
SetEffectActive(_moveEffect, visible);
}
// ============================================================
// 加分飘字特效(UI,攻击阶段持续克隆)
// ============================================================
/// <summary>
/// 协程:攻击阶段持续在屏幕随机位置克隆加分飘字 UI。
/// 按 addSourceSpawnRate 密度(个/秒)持续创建 addSourceDuration 秒。
/// 每个 UI 克隆体存活 addSourceLifetime 秒后自动销毁。
/// </summary>
private IEnumerator SpawnAddSourceRoutine()
{
// 判断是否为自己爆奖
bool isSelf = _killNotice != null && _killNotice.userId == GameManager.Instance.user.id;
GameObject prefab = isSelf ? effectSelfAddSource : effectOtherAddSource;
if (prefab == null)
{
Debug.LogWarning("[PoHuaiQiu] 加分飘字预制体未赋值,跳过");
yield break;
}
// UI 父节点:挂在当前游戏面板的 subPanelParent 下(随 UI 卸载自动清理)
if (CreateFishManager.Instance == null || CreateFishManager.Instance.currGameType == null)
{
Debug.LogWarning("[PoHuaiQiu] CreateFishManager 或 currGameType 为空,跳过加分飘字");
yield break;
}
Transform uiParent = CreateFishManager.Instance.currGameType.subPanelParent;
if (uiParent == null)
{
Debug.LogWarning("[PoHuaiQiu] subPanelParent 为空,跳过加分飘字");
yield break;
}
// 获取 Canvas 的 RectTransform 用于计算屏幕随机范围
Canvas canvas = uiParent.GetComponentInParent<Canvas>();
if (canvas == null)
{
Debug.LogWarning("[PoHuaiQiu] 未找到 Canvas,跳过加分飘字");
yield break;
}
RectTransform canvasRect = canvas.GetComponent<RectTransform>();
// 间隔时间 = 1 / 密度
float interval = 1f / Mathf.Max(1, addSourceSpawnRate);
int totalSpawn = Mathf.RoundToInt(addSourceSpawnRate * addSourceDuration);
Debug.Log($"[PoHuaiQiu] 开始加分飘字 isSelf={isSelf} 密度={addSourceSpawnRate}/s 持续={addSourceDuration}s 总数={totalSpawn}");
for (int i = 0; i < totalSpawn; i++)
{
// 在屏幕范围内随机一个 UI 坐标
Vector2 randomPos = GetRandomUIPosition(canvasRect);
var inst = Instantiate(prefab, uiParent);
var rt = inst.GetComponent<RectTransform>();
if (rt != null)
{
rt.anchoredPosition = randomPos;
}
// 缩放动画:放大 → 停留 0.5s → 缩小 → 销毁
rt.localScale = Vector3.zero;
rt.DOScale(Vector3.one, 0.2f)
.OnComplete(() =>
{
rt.DOScale(Vector3.one, 0.5f)
.OnComplete(() =>
{
rt.DOScale(Vector3.zero, 0.2f)
.OnComplete(() => Destroy(inst));
});
});
yield return new WaitForSeconds(interval);
}
Debug.Log($"[PoHuaiQiu] 加分飘字创建完毕,共 {totalSpawn} 个");
}
/// <summary>在 Canvas 范围内随机一个 UI 坐标(anchoredPosition)</summary>
private Vector2 GetRandomUIPosition(RectTransform canvasRect)
{
float width = canvasRect.rect.width;
float height = canvasRect.rect.height;
float x = Random.Range(-width / 2f, width / 2f);
float y = Random.Range(-height / 2f, height / 2f);
return new Vector2(x, y);
}
// ============================================================
// 动画播放
// ============================================================
#region 动画播放
private void PlayAppearAnim()
{
switch (currAnimType)
@@ -242,18 +486,18 @@ public class PoHuaiQiu_BOSS : MonsterControl_BossBase
}
}
private void PlayDieAnim()
private void PlayAttackAnim()
{
switch (currAnimType)
{
case PHQAnimType.skeletonAnimation:
PlaySkeleton(dieAnimName, false);
PlaySkeleton(attackAnimName, true); // 循环播放
break;
case PHQAnimType.animation:
PlayLegacy(dieAnimName);
PlayLegacy(attackAnimName);
break;
case PHQAnimType.animator:
PlayAnimatorTrigger(animatorDieTrigger);
PlayAnimatorTrigger(animatorAttackTrigger);
break;
}
}
@@ -263,23 +507,19 @@ public class PoHuaiQiu_BOSS : MonsterControl_BossBase
switch (currAnimType)
{
case PHQAnimType.skeletonAnimation:
// Spine 用 Complete 事件精确触发回收
PlaySkeleton(leaveAnimName, false, OnLeaveAnimComplete);
break;
case PHQAnimType.animation:
PlayLegacy(leaveAnimName);
// 旧版 Animation 用 leaveAnimDuration 作为 fallback
StartCoroutine(WaitThenInvoke(leaveAnimDuration, OnLeaveAnimComplete));
break;
case PHQAnimType.animator:
PlayAnimatorTrigger(animatorLeaveTrigger);
// Animator 用 leaveAnimDuration 作为 fallback
StartCoroutine(WaitThenInvoke(leaveAnimDuration, OnLeaveAnimComplete));
break;
}
}
/// <summary>等待指定秒数后执行回调(Animation/Animator 离开动画的 fallback)</summary>
private IEnumerator WaitThenInvoke(float delay, Action callback)
{
yield return new WaitForSeconds(delay);
@@ -293,7 +533,6 @@ public class PoHuaiQiu_BOSS : MonsterControl_BossBase
var track = skel.AnimationState.SetAnimation(0, animName, loop);
if (onComplete != null && !loop)
{
// Spine Complete 事件:非循环动画播放完毕时触发
track.Complete += _ => onComplete();
}
}
@@ -316,5 +555,6 @@ public class PoHuaiQiu_BOSS : MonsterControl_BossBase
{
StopAllCoroutines();
transform.DOKill();
// 特效是 Boss 预制体子物体,随 Boss 一起销毁,无需手动清理
}
}