玩法示例已配置

This commit is contained in:
2025-12-12 23:11:24 +08:00
parent b699d59310
commit 78838fe220
16 changed files with 867 additions and 95 deletions
@@ -92,6 +92,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f55dac113f9a76c44b13c06b35a5f1e8
m_Address: "BlockPuzzle/\u65B9\u5757\u4E34\u65F6"
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 77169ce22e430f64fb36c771815a4a7b, type: 2}
m_SchemaSet:
@@ -13,9 +13,52 @@ MonoBehaviour:
m_Name: BlockPuzzleValidator
m_EditorClassIdentifier:
baseConditions:
- name: "\u6761\u4EF61"
- name: "\u5934"
targetNames:
- "\u57FA\u7840\u6D4B\u8BD51"
- "\u5934"
compareSign: 0
count: 1
- name: "\u8EAB\u4F53"
targetNames:
- "\u8EAB\u4F531"
- "\u8EAB\u4F532"
- "\u8EAB\u4F533"
compareSign: 0
count: 1
- name: "\u817F"
targetNames:
- "\u817F1"
- "\u817F2"
- "\u817F3"
- "\u817F4"
compareSign: 0
count: 1
- name: "\u624B"
targetNames:
- "\u5DE6\u624B1"
- "\u5DE6\u624B2"
- "\u5DE6\u624B3"
- "\u5DE6\u624B4"
- "\u53F3\u624B1"
- "\u53F3\u624B2"
- "\u53F3\u624B3"
- "\u53F3\u624B4"
compareSign: 0
count: 2
extraConditions:
- name: "\u5DE6\u624B"
targetNames:
- "\u5DE6\u624B1"
- "\u5DE6\u624B2"
- "\u5DE6\u624B3"
- "\u5DE6\u624B4"
compareSign: 0
count: 1
- name: "\u53F3\u624B"
targetNames:
- "\u53F3\u624B1"
- "\u53F3\u624B2"
- "\u53F3\u624B3"
- "\u53F3\u624B4"
compareSign: 0
count: 1
extraConditions: []
@@ -398,7 +398,7 @@ Transform:
m_GameObject: {fileID: 2343822804118529033}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.5, y: -2.5, z: 0}
m_LocalPosition: {x: -7.08, y: -3.57, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@@ -416,8 +416,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 990de8ef2a6774544b9bc9b64af0a8a5, type: 3}
m_Name:
m_EditorClassIdentifier:
width: 5
height: 5
width: 7
height: 7
cellSize: 1
showCellStates: 1
--- !u!114 &1146770068189822050
@@ -796,8 +796,8 @@ MonoBehaviour:
clearButton: {fileID: 1754389977258605594}
puzzleData:
puzzleName: Game1
gridWidth: 5
gridHeight: 5
gridWidth: 7
gridHeight: 7
cellSize: 1
gridShapeDataInfos: []
shapeRackDataInfos: []
@@ -1460,10 +1460,4 @@ MonoBehaviour:
scrollRect: {fileID: 2647779748265987856}
shapeCreateButtonPrefab: {fileID: 2562226395007143204, guid: f0804046fd11f7a4a8f27886f2bd3cb0, type: 3}
blockShapePrefab: {fileID: 1355800832498282156, guid: 03e5e9a1437535042ae48b2ba034dd93, type: 3}
blockShapeDataList:
- key: "\u57FA\u7840\u6D4B\u8BD51"
count: 1
- key: "\u57FA\u7840\u6D4B\u8BD52"
count: 1
- key: "\u57FA\u7840\u6D4B\u8BD53"
count: 1
blockShapeDataList: []
@@ -0,0 +1,551 @@
fileFormatVersion: 2
guid: f55dac113f9a76c44b13c06b35a5f1e8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 200
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: "\u5DE6\u624B2"
rect:
serializedVersion: 2
x: 37
y: 1502
width: 246
height: 397
alignment: 9
pivot: {x: 0.58943087, y: 0.25188917}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d170fd683a286754bb3a41770728989c
internalID: -2037391131
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u53F3\u624B2"
rect:
serializedVersion: 2
x: 341
y: 1495
width: 239
height: 399
alignment: 9
pivot: {x: 0.41841003, y: 0.25062656}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 44e4832cd90c83f4197d8ee0984df835
internalID: 1083705981
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u5DE6\u624B3"
rect:
serializedVersion: 2
x: 666
y: 1507
width: 261
height: 392
alignment: 9
pivot: {x: 0.61685824, y: 0.25510204}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: bdb56f7dc13654245960f87f4c1f26d7
internalID: 947493838
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u53F3\u624B3"
rect:
serializedVersion: 2
x: 970
y: 1507
width: 260
height: 392
alignment: 9
pivot: {x: 0.3846154, y: 0.25510204}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 3e7a4df5bff17284bbd635918e5ebb40
internalID: -334821789
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u5DE6\u624B4"
rect:
serializedVersion: 2
x: 1291
y: 1496
width: 307
height: 400
alignment: 9
pivot: {x: 0.022801302, y: 0.25}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: e14d95af96333f749b7c499b21e8006d
internalID: 457756224
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u53F3\u624B4"
rect:
serializedVersion: 2
x: 1645
y: 1494
width: 307
height: 400
alignment: 9
pivot: {x: 0.3257329, y: 0.25}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 8b6a476bb9452ea4489d58f4c7b3b6a8
internalID: 1790534523
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u6838\u5FC31"
rect:
serializedVersion: 2
x: 52
y: 920
width: 253
height: 253
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d287bbaa5c78eaa44810aed4b5bb3cbf
internalID: 891764067
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u6838\u5FC32"
rect:
serializedVersion: 2
x: 354
y: 942
width: 366
height: 209
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: bc792b80f97cb5f47bcd1e2342df718a
internalID: 1577228767
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u5934"
rect:
serializedVersion: 2
x: 778
y: 946
width: 517
height: 357
alignment: 9
pivot: {x: 0.116054155, y: 0.28011206}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: de81dfbd81768e5459525bd76a0f9faa
internalID: -1093189618
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u5DE6\u624B1"
rect:
serializedVersion: 2
x: 1372
y: 940
width: 251
height: 421
alignment: 9
pivot: {x: 0.5976096, y: 0.2874109}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 24338819ff86c3a429976e45322a859d
internalID: -1592744588
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u53F3\u624B1"
rect:
serializedVersion: 2
x: 1695
y: 940
width: 251
height: 421
alignment: 9
pivot: {x: 0.3984064, y: 0.2874109}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: ce1eaecac2ce2d94c8bf3230f45f08be
internalID: 1387011875
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u8EAB\u4F531"
rect:
serializedVersion: 2
x: 38
y: 417
width: 600
height: 400
alignment: 9
pivot: {x: 0.16666667, y: 0.25}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 37fe70bd62819394189245db2f36f00e
internalID: 1563902846
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u8EAB\u4F532"
rect:
serializedVersion: 2
x: 699
y: 417
width: 596
height: 400
alignment: 9
pivot: {x: 0.16778524, y: 0.25}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 14f4505e2cb811142b9d0547cd095493
internalID: 2147264353
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u8EAB\u4F533"
rect:
serializedVersion: 2
x: 1350
y: 417
width: 601
height: 400
alignment: 9
pivot: {x: 0.16638935, y: 0.25}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 0e6ad87d64f220c48aa18b94a0467d44
internalID: -1475095932
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u817F1"
rect:
serializedVersion: 2
x: 33
y: 181
width: 459
height: 145
alignment: 9
pivot: {x: 0.054466233, y: 0.31034482}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 1dab4949aeec5fe4c929426c24133fe5
internalID: 1314429545
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u817F2"
rect:
serializedVersion: 2
x: 529
y: 100
width: 459
height: 226
alignment: 9
pivot: {x: 0.054466233, y: 0.5575221}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: bd407f76a40f3fc4ab16dea123256168
internalID: -999177635
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u817F3"
rect:
serializedVersion: 2
x: 1020
y: 130
width: 479
height: 197
alignment: 9
pivot: {x: 0.03131524, y: 0.49238577}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2228bd64b4c714f47885c7ce6c04ffc6
internalID: -2115660748
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: "\u817F4"
rect:
serializedVersion: 2
x: 1512
y: 146
width: 455
height: 180
alignment: 9
pivot: {x: 0.05934066, y: 0.44444445}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d616f55b70e379a43a9e3fcb5df4f11c
internalID: -1777218748
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable:
"\u53F3\u624B1": 1387011875
"\u53F3\u624B2": 1083705981
"\u53F3\u624B3": -334821789
"\u53F3\u624B4": 1790534523
"\u5934": -1093189618
"\u5DE6\u624B1": -1592744588
"\u5DE6\u624B2": -2037391131
"\u5DE6\u624B3": 947493838
"\u5DE6\u624B4": 457756224
"\u65B9\u5757\u4E34\u65F6_8": -820051272
"\u65B9\u5757\u4E34\u65F6_9": -866202323
"\u6838\u5FC31": 891764067
"\u6838\u5FC32": 1577228767
"\u817F1": 1314429545
"\u817F2": -999177635
"\u817F3": -2115660748
"\u817F4": -1777218748
"\u8EAB\u4F531": 1563902846
"\u8EAB\u4F532": 2147264353
"\u8EAB\u4F533": -1475095932
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
+9 -13
View File
@@ -463,19 +463,15 @@ MonoBehaviour:
m_PostInfinity: 2
m_RotationOrder: 4
_filter:
- 0.0048309183
- 0.016401261
- 0.04532712
- 0.08293076
- 0.12053438
- 0.14946026
- 0.1610306
- 0.14946026
- 0.12053438
- 0.08293076
- 0.04532712
- 0.016401261
- 0.0048309183
- 0.007228916
- 0.043749984
- 0.12409639
- 0.20444278
- 0.24096388
- 0.20444278
- 0.12409639
- 0.043749984
- 0.007228916
--- !u!114 &-6086986437317696584
MonoBehaviour:
m_ObjectHideFlags: 3
+160
View File
@@ -402,6 +402,114 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.size
value: 3
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.size
value: 6
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[0].key
value: "\u5DE6\u624B1"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[1].key
value: "\u5DE6\u624B2"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[2].key
value: "\u53F3\u624B1"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[3].key
value: "\u53F3\u624B2"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[4].key
value: "\u817F2"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[5].key
value: "\u817F3"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[0].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[1].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[2].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[3].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[4].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.shapeRackDataInfos.Array.data[5].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[0].shapeKey
value: "\u817F1"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[1].shapeKey
value: "\u5934"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[2].shapeKey
value: "\u8EAB\u4F531"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[3].shapeKey
value: "\u8EAB\u4F531"
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[0].rootCell.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[0].rootCell.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[1].rootCell.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[1].rootCell.y
value: 4
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[2].rootCell.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[2].rootCell.y
value: 2
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[3].rootCell.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[3].rootCell.y
value: 2
objectReference: {fileID: 0}
- target: {fileID: 205405881972710832, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: puzzleData.gridShapeDataInfos.Array.data[0].isDraggable
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1133554645891563439, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@@ -442,6 +550,58 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.size
value: 6
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[0].key
value: "\u5DE6\u624B1"
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[1].key
value: "\u5DE6\u624B2"
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[2].key
value: "\u53F3\u624B1"
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[3].key
value: "\u53F3\u624B2"
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[4].key
value: "\u817F2"
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[5].key
value: "\u817F3"
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[0].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[1].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[2].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[3].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[4].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2723775303383625144, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: blockShapeDataList.Array.data[5].count
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4217940846594628863, guid: 5b2e098922156b645a82b7bcdb436ac9, type: 3}
propertyPath: m_AnchorMax.x
value: 0
@@ -93,9 +93,33 @@ namespace AibisDream.Framework
}
#if UNITY_EDITOR
public static bool GetAssetAddressableKey(UnityEngine.Object asset, out string addressableKey)
public static bool GetAssetAddressableKey<T>(T asset, out string addressableKey) where T : UnityEngine.Object
{
string path = AssetDatabase.GetAssetPath(asset);
// 如果是Sprite,并且是Multiple模式,则单独处理
if (asset is Sprite sprite && AssetImporter.GetAtPath(path) is TextureImporter importer)
{
if (importer.textureType == TextureImporterType.Sprite && importer.spriteImportMode == SpriteImportMode.Multiple)
{
if (TryGetAddressableKey(path, out var addressableKeyPrefix))
{
addressableKey = $"{addressableKeyPrefix}[{sprite.name}]";
return true;
}
else
{
addressableKey = addressableKeyPrefix;
return false;
}
}
}
// 其他情况正常输出
return TryGetAddressableKey(path, out addressableKey);
}
private static bool TryGetAddressableKey(string path, out string addressableKey)
{
// 获取其在Addressables里的路径
var settings = UnityEditor.AddressableAssets.AddressableAssetSettingsDefaultObject.Settings;
if (settings != null)
@@ -103,12 +127,11 @@ namespace AibisDream.Framework
var entry = settings.FindAssetEntry(AssetDatabase.AssetPathToGUID(path));
if (entry != null)
{
Debug.Log($"Addressable Key: {entry.address}");
addressableKey = entry.address;
return true;
}
}
Debug.Log($"资源{asset.name}不存在于Addressables中");
Debug.Log($"资源{path}不存在于Addressables中");
addressableKey = path;
return false;
}
@@ -141,13 +141,6 @@ namespace AibisDream
public bool WorldToGrid(Vector3 worldPos, out int gridX, out int gridY)
{
if (!_isInitialized)
{
gridX = 0;
gridY = 0;
return false;
}
Vector3 localPos = worldPos - Origin;
gridX = Mathf.FloorToInt(localPos.x / CellSize);
gridY = Mathf.FloorToInt(localPos.y / CellSize);
@@ -235,13 +228,5 @@ namespace AibisDream
OnShapePlaced = null;
}
}
[Serializable]
public struct GridShapeData
{
public string shapeKey;
public Vector2Int rootCell;
public RotationAngle rotationAngle;
}
}
@@ -206,4 +206,45 @@ namespace AibisDream
BlockPuzzleSystem.Instance.ResetGame();
}
}
[Serializable]
public struct BlockPuzzleData
{
public string puzzleName;
public int gridWidth;
public int gridHeight;
public float cellSize;
// 网格内Shape
public GridShapeData[] gridShapeDataInfos;
// 图形货架内Shape
public RackDataInfo[] shapeRackDataInfos;
}
[Serializable]
public struct GridShapeData
{
public string shapeKey;
public Vector2Int rootCell;
public RotationAngle rotationAngle;
public bool isDraggable;
}
[Serializable]
public struct BlockShapeData
{
public int shapeId;
public string shapeName;
public int width;
public int height;
public float cellSize;
public string originalPatternStr;
public string spritePath;
}
[Serializable]
public struct RackDataInfo
{
public string key;
public int count;
}
}
@@ -69,6 +69,7 @@ namespace AibisDream
var shape = shapeRack.CreateBlockShape(shapeData.shapeKey);
shape.Rotate(shapeData.rotationAngle);
grid.TrySnapToGrid(shape, shapeData.rootCell);
shape.GetComponent<ShapeDragger>().IsDraggable = shapeData.isDraggable;
}
grid.OnShapePlaced += PreCheckGameState;
@@ -149,8 +150,8 @@ namespace AibisDream
public void SaveConfig()
{
var gridShapeDataInfos = grid.ShapeDict.Values.ToArray();
var shapeRackDataInfos = shapeRack.blockShapeDataList.ToArray();
var gridShapeDataInfos = grid.ShapeDict?.Values.ToArray();
var shapeRackDataInfos = shapeRack.blockShapeDataList?.ToArray();
puzzleData.gridShapeDataInfos = gridShapeDataInfos;
puzzleData.shapeRackDataInfos = shapeRackDataInfos;
@@ -160,21 +161,7 @@ namespace AibisDream
public void CreateShapeInEditor(string shapeKey)
{
var shape = shapeRack.CreateBlockShape(shapeKey);
shape.InitInEditor(grid);
shapeRack.CreateBlockShape(shapeKey);
}
}
[Serializable]
public struct BlockPuzzleData
{
public string puzzleName;
public int gridWidth;
public int gridHeight;
public float cellSize;
// 网格内Shape
public GridShapeData[] gridShapeDataInfos;
// 图形货架内Shape
public RackDataInfo[] shapeRackDataInfos;
}
}
@@ -48,6 +48,7 @@ namespace AibisDream
{
ShapeDragger = GetComponent<ShapeDragger>();
_blockShapeData = blockShapeData;
gameObject.name = blockShapeData.shapeName;
// 加载Sprite
LoadSprite();
// 更新碰撞体
@@ -597,19 +598,19 @@ namespace AibisDream
return vertices;
}
private BlockPuzzleGrid _grid;
public void InitInEditor(BlockPuzzleGrid grid)
{
_grid = grid;
}
public void SnapToGrid()
{
var snapResult = _grid.CheckSnapToGrid(this);
var grid = FindFirstObjectByType<BlockPuzzleGrid>();
if (grid == null)
{
Debug.LogWarning("无法找到BlockPuzzleGrid");
return;
}
var snapResult = grid.CheckSnapToGrid(this);
if (snapResult.canSnap)
{
_grid.TrySnapToGrid(this, snapResult.RootCell);
grid.TrySnapToGrid(this, snapResult.RootCell);
}
else
{
@@ -623,20 +624,8 @@ namespace AibisDream
if (grid != null)
{
grid.ShapeDict.Remove(this);
Destroy(gameObject);
DestroyImmediate(gameObject);
}
}
}
[Serializable]
public struct BlockShapeData
{
public int shapeId;
public string shapeName;
public int width;
public int height;
public float cellSize;
public string originalPatternStr;
public string spritePath;
}
}
@@ -99,11 +99,4 @@ namespace AibisDream
return CreateBlockShape(blockShapeData);
}
}
[Serializable]
public struct RackDataInfo
{
public string key;
public int count;
}
}
@@ -23,6 +23,7 @@ namespace AibisDream
// 将Shape的世界坐标转换为网格坐标(可以是虚拟坐标)
bool inGrid = grid.WorldToGrid(shape.transform.position, out int gridX, out int gridY);
Debug.Log($"inGrid: {inGrid}");
if (!inGrid) return result;
// 将形状的所有格子转换为网格坐标
@@ -105,7 +106,8 @@ namespace AibisDream
var gridShapeData = new GridShapeData {
shapeKey = shape.ShapeName,
rootCell = rootCell,
rotationAngle = shape.CurrentRotation
rotationAngle = shape.CurrentRotation,
isDraggable = shape.GetComponent<ShapeDragger>().IsDraggable
};
grid.ShapeDict.Add(shape, gridShapeData);
}
@@ -1 +1 @@
{"Game1":{"puzzleName":"Game1","gridWidth":5,"gridHeight":5,"cellSize":1.0,"gridShapeDataInfos":[{"shapeKey":"基础测试1","rootCell":{"x":0,"y":0,"magnitude":0.0,"sqrMagnitude":0},"rotationAngle":0},{"shapeKey":"基础测试3","rootCell":{"x":3,"y":2,"magnitude":3.60555124,"sqrMagnitude":13},"rotationAngle":90}],"shapeRackDataInfos":[{"key":"基础测试1","count":1},{"key":"基础测试2","count":1},{"key":"基础测试3","count":1}]}}
{"Game1":{"puzzleName":"Game1","gridWidth":7,"gridHeight":7,"cellSize":1.0,"gridShapeDataInfos":[{"shapeKey":"1","rootCell":{"x":2,"y":1,"magnitude":2.236068,"sqrMagnitude":5},"rotationAngle":0,"isDraggable":true},{"shapeKey":"头","rootCell":{"x":2,"y":4,"magnitude":4.472136,"sqrMagnitude":20},"rotationAngle":0,"isDraggable":false},{"shapeKey":"身体1","rootCell":{"x":2,"y":2,"magnitude":2.828427,"sqrMagnitude":8},"rotationAngle":0,"isDraggable":false}],"shapeRackDataInfos":[{"key":"左手1","count":1},{"key":"左手2","count":1},{"key":"右手1","count":1},{"key":"右手2","count":1},{"key":"腿2","count":1},{"key":"腿3","count":1}]}}
@@ -1 +1 @@
{"基础测试2":{"shapeId":2,"shapeName":"基础测试2","width":2,"height":3,"cellSize":1.0,"originalPatternStr":"0,1,1;1,1,0","spritePath":"BlockShape/条状"},"基础测试1":{"shapeId":0,"shapeName":"基础测试1","width":2,"height":3,"cellSize":1.0,"originalPatternStr":"0,1,1;1,1,0","spritePath":"BlockShape/条状"},"基础测试3":{"shapeId":3,"shapeName":"基础测试3","width":2,"height":3,"cellSize":1.0,"originalPatternStr":"0,1,1;1,1,0","spritePath":"BlockShape/条状"}}
{"基础测试2":{"shapeId":2,"shapeName":"基础测试2","width":2,"height":3,"cellSize":1.0,"originalPatternStr":"0,1,1;1,1,0","spritePath":"BlockShape/条状"},"基础测试1":{"shapeId":0,"shapeName":"基础测试1","width":2,"height":3,"cellSize":1.0,"originalPatternStr":"0,1,1;1,1,0","spritePath":"BlockShape/条状"},"基础测试3":{"shapeId":3,"shapeName":"基础测试3","width":2,"height":3,"cellSize":1.0,"originalPatternStr":"0,1,1;1,1,0","spritePath":"BlockShape/条状"},"头":{"shapeId":2,"shapeName":"头","width":3,"height":2,"cellSize":1.0,"originalPatternStr":"1,1;1,1;1,1","spritePath":"BlockPuzzle/方块临时[头]"},"身体1":{"shapeId":2,"shapeName":"身体1","width":3,"height":2,"cellSize":1.0,"originalPatternStr":"1,1;1,1;1,1","spritePath":"BlockPuzzle/方块临时[身体1]"},"身体2":{"shapeId":2,"shapeName":"身体2","width":3,"height":2,"cellSize":1.0,"originalPatternStr":"1,1;1,1;1,1","spritePath":"BlockPuzzle/方块临时[身体2]"},"身体3":{"shapeId":2,"shapeName":"身体3","width":3,"height":2,"cellSize":1.0,"originalPatternStr":"1,1;1,1;1,1","spritePath":"BlockPuzzle/方块临时[身体3]"},"腿1":{"shapeId":2,"shapeName":"腿1","width":3,"height":1,"cellSize":1.0,"originalPatternStr":"1;1;1","spritePath":"BlockPuzzle/方块临时[腿1]"},"腿2":{"shapeId":2,"shapeName":"腿2","width":3,"height":1,"cellSize":1.0,"originalPatternStr":"1;1;1","spritePath":"BlockPuzzle/方块临时[腿2]"},"腿3":{"shapeId":2,"shapeName":"腿3","width":3,"height":1,"cellSize":1.0,"originalPatternStr":"1;1;1","spritePath":"BlockPuzzle/方块临时[腿3]"},"腿4":{"shapeId":2,"shapeName":"腿4","width":3,"height":1,"cellSize":1.0,"originalPatternStr":"1;1;1","spritePath":"BlockPuzzle/方块临时[腿4]"},"左手4":{"shapeId":2,"shapeName":"左手4","width":2,"height":2,"cellSize":1.0,"originalPatternStr":"1,1;1,1","spritePath":"BlockPuzzle/方块临时[左手4]"},"左手2":{"shapeId":2,"shapeName":"左手2","width":1,"height":2,"cellSize":1.0,"originalPatternStr":"1,1","spritePath":"BlockPuzzle/方块临时[左手2]"},"左手3":{"shapeId":2,"shapeName":"左手3","width":1,"height":2,"cellSize":1.0,"originalPatternStr":"1,1","spritePath":"BlockPuzzle/方块临时[左手3]"},"右手4":{"shapeId":2,"shapeName":"右手4","width":2,"height":2,"cellSize":1.0,"originalPatternStr":"1,1;1,1","spritePath":"BlockPuzzle/方块临时[右手4]"},"右手3":{"shapeId":2,"shapeName":"右手3","width":1,"height":2,"cellSize":1.0,"originalPatternStr":"1,1","spritePath":"BlockPuzzle/方块临时[右手3]"},"右手2":{"shapeId":2,"shapeName":"右手2","width":1,"height":2,"cellSize":1.0,"originalPatternStr":"1,1","spritePath":"BlockPuzzle/方块临时[右手2]"},"右手1":{"shapeId":2,"shapeName":"右手1","width":1,"height":2,"cellSize":1.0,"originalPatternStr":"1,1","spritePath":"BlockPuzzle/方块临时[右手1]"},"左手1":{"shapeId":2,"shapeName":"左手1","width":1,"height":2,"cellSize":1.0,"originalPatternStr":"1,1","spritePath":"BlockPuzzle/方块临时[左手1]"}}