fix:调整拼图系统

This commit is contained in:
bzx
2026-04-01 18:38:00 +08:00
parent 05d3c2244e
commit 2a4e9fcce6
27 changed files with 988 additions and 44 deletions

View File

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

View File

@ -0,0 +1,70 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &6839460479272970973
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.1121
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 83547e64fb3952d428dc97deaff32f90,
type: 3}
propertyPath: m_Name
value: "\u6EDA\u8F6E\u5BC6\u7801\u9501"
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 83547e64fb3952d428dc97deaff32f90, type: 3}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 88d455dfdb969ab48be9a2ef2eb461c9
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,171 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-4410094119548642556
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: aiStandardSurface1
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _NORMALMAP
m_InvalidKeywords: []
m_LightmapFlags: 6
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BASE_COLOR_MAP:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 2800000, guid: b4cc8449600eeb749a5a6265f3f617ab, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 2800000, guid: a28009a824ff4f3429289236000387c5, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EMISSION_COLOR_MAP:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _METALNESS_MAP:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: b4cc8449600eeb749a5a6265f3f617ab, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NORMAL_MAP:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SPECULAR_COLOR_MAP:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SPECULAR_IOR_MAP:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SPECULAR_ROUGHNESS_MAP:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.2
- _GlossyReflections: 1
- _METALNESS: 0
- _Metallic: 0.5
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueControl: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _SPECULAR_IOR: 1.5
- _SPECULAR_ROUGHNESS: 0.2
- _Smoothness: 0.49
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BASE_COLOR: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EMISSION_COLOR: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SPECULAR_COLOR: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 90be0fbc8e337884fb7a4906e74dd866
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: b4cc8449600eeb749a5a6265f3f617ab
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
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: 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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: a28009a824ff4f3429289236000387c5
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
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: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 1
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: 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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 83547e64fb3952d428dc97deaff32f90
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
type: UnityEngine:Material
assembly: UnityEngine.CoreModule
name: aiStandardSurface1
second: {fileID: 2100000, guid: 90be0fbc8e337884fb7a4906e74dd866, type: 2}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -142,7 +142,7 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DepthColor: {r: 0.05, g: 0.2, b: 0.35, a: 1}
- _DripRipplePositions: {r: -0.35680002, g: 1.8154, b: -0.35680002, a: 1.8154}
- _DripRippleTimes: {r: 24.78042, g: 26.78164, b: -10, a: -10}
- _DripRippleTimes: {r: 136.97975, g: 134.97751, b: -10, a: -10}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _FresnelColor: {r: 0.8, g: 0.9, b: 1, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}

View File

@ -15,7 +15,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &3832839186908490715
Transform:
m_ObjectHideFlags: 0

View File

@ -107,8 +107,8 @@ MonoBehaviour:
isGrabbed: 0
puzzleTable: {fileID: 0}
currentSlot: {fileID: 0}
rb: {fileID: 0}
fragmentCollider: {fileID: 0}
rb: {fileID: -8351497618002639265}
fragmentCollider: {fileID: 3838324254599613900}
grabFollowSpeed: 20
normalMaterial: {fileID: 0}
highlightMaterial: {fileID: 0}
@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -107,8 +107,8 @@ MonoBehaviour:
isGrabbed: 0
puzzleTable: {fileID: 0}
currentSlot: {fileID: 0}
rb: {fileID: 0}
fragmentCollider: {fileID: 0}
rb: {fileID: -2704628964027859501}
fragmentCollider: {fileID: 4100094780248623792}
grabFollowSpeed: 20
normalMaterial: {fileID: 0}
highlightMaterial: {fileID: 0}
@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -164,8 +164,8 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@ -20677,6 +20677,83 @@ MonoBehaviour:
m_Flags: 0
m_Reference: {fileID: 0}
m_ButtonPressPoint: 0.5
--- !u!1001 &1144253457
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2099039037632757708, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9573791
objectReference: {fileID: 0}
- target: {fileID: 2099039037632757708, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.28883433
objectReference: {fileID: 0}
- target: {fileID: 2099039037632757708, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2099039037632757708, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2099039037632757708, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 33.576
objectReference: {fileID: 0}
- target: {fileID: 5921051261296072588, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_Name
value: "\u6EDA\u8F6E\u5BC6\u7801\u9501"
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalPosition.x
value: 0.36593473
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalPosition.z
value: 2.43367
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6440178721027394870, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 88d455dfdb969ab48be9a2ef2eb461c9, type: 3}
--- !u!1 &1151815201
GameObject:
m_ObjectHideFlags: 0
@ -35053,7 +35130,7 @@ Transform:
m_GameObject: {fileID: 919132147986095121}
serializedVersion: 2
m_LocalRotation: {x: -0.5, y: 0.5, z: 0.5, w: 0.5}
m_LocalPosition: {x: 0.0767, y: 0.266, z: 0}
m_LocalPosition: {x: 0, y: 0.332, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -36534,6 +36611,7 @@ MonoBehaviour:
coinPlatform: {fileID: 1862316938}
hiddenCoinEvent: {fileID: 2030637937}
coinPre: {fileID: 3319392377428400056, guid: 8876522d7f04c4241b19f30a4c0f4ede, type: 3}
currentEventState: 0
GuideArrowPre: {fileID: 718552219040796497, guid: 1090ff9efb8eaa94cbdc6dfa4042d3b7, type: 3}
--- !u!33 &4175203583539743826
MeshFilter:
@ -38485,3 +38563,4 @@ SceneRoots:
- {fileID: 1018358334}
- {fileID: 198656620}
- {fileID: 933166546}
- {fileID: 1144253457}

View File

@ -33,6 +33,20 @@ public enum GameState
Settle
}
/// <summary>
/// 事件状态 - 玩家当前参与的事件
/// </summary>
public enum EventState
{
None = 0, // 未参与任何事件
PuzzleTable = 1, // 拼图台事件
MonkeyBasket = 2, // 猴子投篮事件
TreasureBox = 3, // 宝箱密码事件
Stalactite = 4, // 钟乳石事件
MapFragment = 5, // 地图碎片收集事件
NumberGearBox = 6 // 滚轮密码锁事件
}
public class GameManager : MonoBehaviour
{
public static GameManager Ins { get; private set; }
@ -64,6 +78,56 @@ public class GameManager : MonoBehaviour
public HiddenCoinEvent hiddenCoinEvent; // 隐藏事件管理器
public GameObject coinPre;
#region
[Header("事件状态")]
public EventState currentEventState = EventState.None; // 当前参与的事件
/// <summary>
/// 检查是否可以触发指定事件
/// 玩家未参与任何事件时可以触发,或已在同一事件中可继续
/// </summary>
public bool CanTriggerEvent(EventState eventToTrigger)
{
return currentEventState == EventState.None || currentEventState == eventToTrigger;
}
/// <summary>
/// 设置当前事件状态
/// </summary>
public void SetEventState(EventState state)
{
currentEventState = state;
Debug.Log($"事件状态切换为: {state}");
}
/// <summary>
/// 清除事件状态(事件结束)
/// </summary>
public void ClearEventState()
{
currentEventState = EventState.None;
Debug.Log("事件状态已清除");
}
/// <summary>
/// 获取当前事件状态
/// </summary>
public EventState GetCurrentEventState()
{
return currentEventState;
}
/// <summary>
/// 检查是否正在参与某个事件
/// </summary>
public bool IsInAnyEvent()
{
return currentEventState != EventState.None;
}
#endregion
#region
// 新增:指引系统

View File

@ -60,6 +60,12 @@ public class MapFragment : MonoBehaviour
private Renderer fragmentRenderer;
private Material fragmentMaterial;
// 全局静态变量:当前被抓取的碎片(限制每次只能抓取一个)
private static MapFragment currentlyGrabbedMapFragment = null;
// 触发器检测:右手是否在碎片范围内
private bool rightHandInTrigger = false;
public int FragmentId => fragmentId;
public int CorrectSlotId => correctSlotId;
public bool IsInStorageZone => inStorageZone;
@ -456,19 +462,90 @@ public class MapFragment : MonoBehaviour
/// <summary>
/// 检测右手交互
/// 条件:触发器检测右手进入 + (扳机或鼠标左键) + 当前没有其他碎片被抓取
/// </summary>
private void CheckRightHandInteraction()
{
// 必须右手在触发器范围内
if (!rightHandInTrigger) return;
RightHand rightHand = FindObjectOfType<RightHand>();
if (rightHand == null) return;
float distance = Vector3.Distance(transform.position, rightHand.transform.position);
// 检测扳机或鼠标左键
bool triggerPressed = rightHand.isTrigger;
// 检测抓取使用isTrigger代替IsGrabbing
if (rightHand.isTrigger && distance < 0.15f && !isGrabbed)
#if UNITY_EDITOR
// 编辑器模式:鼠标左键模拟扳机
triggerPressed = triggerPressed || Input.GetMouseButton(0);
#endif
// 每次只能抓取一个碎片
if (triggerPressed && currentlyGrabbedMapFragment == null && !isGrabbed)
{
OnGrabbed(rightHand);
currentlyGrabbedMapFragment = this;
}
// 检测松手(扳机和鼠标左键都释放)
if (isGrabbed)
{
bool triggerReleased = !rightHand.isTrigger;
#if UNITY_EDITOR
triggerReleased = triggerReleased && !Input.GetMouseButton(0);
#endif
if (triggerReleased)
{
OnReleased();
}
}
}
#region
private void OnTriggerEnter(Collider other)
{
// 检测右手碰触
if (!isGrabbed && !isFlying)
{
RightHand rightHand = other.GetComponent<RightHand>();
if (rightHand != null)
{
rightHandInTrigger = true;
Debug.Log($"右手进入MapFragment {fragmentId} 触发器范围");
}
}
}
private void OnTriggerExit(Collider other)
{
// 右手离开触发器范围
if (!isGrabbed && !isFlying)
{
RightHand rightHand = other.GetComponent<RightHand>();
if (rightHand != null)
{
rightHandInTrigger = false;
Debug.Log($"右手离开MapFragment {fragmentId} 触发器范围");
}
}
}
#endregion
/// <summary>
/// 松手时清除全局抓取状态
/// </summary>
private void OnReleased()
{
if (currentlyGrabbedMapFragment == this)
{
currentlyGrabbedMapFragment = null;
}
isGrabbed = false;
Debug.Log($"拼图碎片 {fragmentId} 松手");
}
/// <summary>

View File

@ -45,14 +45,9 @@ public class PuzzleBowlArea : MonoBehaviour
float x = Mathf.Cos(randomAngle * Mathf.Deg2Rad) * randomRadius;
float z = Mathf.Sin(randomAngle * Mathf.Deg2Rad) * randomRadius;
// 计算堆叠高度(基于碎片数量)
int layerIndex = fragmentsInBowl.Count / maxFragmentsPerLayer;
float stackHeight = layerIndex * fragmentHeightOffset;
// 限制最大堆叠高度
stackHeight = Mathf.Min(stackHeight, maxStackHeight);
Vector3 position = BowlCenterPosition + new Vector3(x, stackHeight + bowlHeight, z);
// 碎片生成在碗底中心高度,让物理引擎处理自然堆叠
// 不再手动计算堆叠高度,避免碎片悬浮在半空中
Vector3 position = BowlCenterPosition + new Vector3(x, 0.01f, z);
return position;
}
@ -86,7 +81,6 @@ public class PuzzleBowlArea : MonoBehaviour
public void RemoveFragment(PuzzleFragment fragment)
{
if (fragment == null) return;
fragmentsInBowl.Remove(fragment);
Debug.Log($"碎片 {fragment.FragmentId} 从碗中移除,当前碗中碎片数: {fragmentsInBowl.Count}");

View File

@ -50,6 +50,16 @@ public class PuzzleFragment : MonoBehaviour
// 旋转角度选项
private readonly int[] rotationAngles = { 0, 90, 180, 270 };
// 全局静态变量当前被抓取的PuzzleFragment限制每次只能抓取一个
private static PuzzleFragment currentlyGrabbedPuzzleFragment = null;
// 触发器检测:右手是否在碎片范围内
private bool rightHandInTrigger = false;
// 旋转冷却时间(防止连续触发)
private float lastRotateTime = 0f;
private float rotateCooldown = 0.5f;
public int FragmentId => fragmentId;
public int CorrectRotation => correctRotation;
public int CurrentRotation => currentRotation;
@ -84,6 +94,71 @@ public class PuzzleFragment : MonoBehaviour
{
FollowHand();
}
// 检测右手交互(编辑器鼠标左键模拟抓取)
if (!isLocked && !isGrabbed)
{
CheckRightHandInteraction();
}
// 检测松手
if (isGrabbed)
{
CheckRelease();
}
}
/// <summary>
/// 检测右手交互(抓取检测)
/// 条件:触发器检测右手进入 + (扳机或鼠标左键) + 当前没有其他碎片被抓取
/// </summary>
private void CheckRightHandInteraction()
{
// 必须右手在触发器范围内
if (!rightHandInTrigger) return;
RightHand rightHand = GameManager.Ins?.playerRightHand;
if (rightHand == null) return;
// 检测扳机或鼠标左键
bool triggerPressed = rightHand.isTrigger;
#if UNITY_EDITOR
// 编辑器模式:鼠标左键模拟扳机
triggerPressed = triggerPressed || Input.GetMouseButton(0);
#endif
// 每次只能抓取一个碎片
if (triggerPressed && currentlyGrabbedPuzzleFragment == null)
{
OnGrabbed(rightHand.transform);
currentlyGrabbedPuzzleFragment = this;
}
}
/// <summary>
/// 检测松手(扳机和鼠标左键都释放)
/// </summary>
private void CheckRelease()
{
RightHand rightHand = GameManager.Ins?.playerRightHand;
if (rightHand == null) return;
bool triggerReleased = !rightHand.isTrigger;
#if UNITY_EDITOR
triggerReleased = triggerReleased && !Input.GetMouseButton(0);
#endif
if (triggerReleased)
{
// 清除全局抓取状态
if (currentlyGrabbedPuzzleFragment == this)
{
currentlyGrabbedPuzzleFragment = null;
}
OnReleased();
}
}
#region
@ -198,9 +273,11 @@ public class PuzzleFragment : MonoBehaviour
currentSlot = slot;
isInSlot = true;
// 设置到卡槽位置
transform.DOMove(slot.SlotPosition, 0.2f).SetEase(Ease.OutBack);
// 设置父物体,再设置本地位置和本地旋转为零
transform.SetParent(slot.transform);
transform.DOLocalMove(Vector3.zero, 0.2f).SetEase(Ease.OutBack);
transform.DOLocalRotate(Vector3.zero, 0.2f).SetEase(Ease.OutBack);
currentRotation = 0;
// 禁用物理
if (rb != null)
@ -519,33 +596,54 @@ public class PuzzleFragment : MonoBehaviour
private void OnTriggerEnter(Collider other)
{
// 检测手柄碰触(用于旋转提示)
if (isInSlot && !isLocked && !isGrabbed)
// 检测右手碰触
if (!isLocked && !isGrabbed)
{
RightHand rightHand = other.GetComponent<RightHand>();
if (rightHand != null)
{
// 高亮提示可旋转
rightHandInTrigger = true;
// 高亮提示可抓取/可旋转
if (fragmentRenderer != null && highlightMaterial != null)
{
fragmentRenderer.material = highlightMaterial;
}
// 如果碎片在卡槽中且未锁定,右手碰到就旋转
if (isInSlot && !isLocked)
{
// 检查冷却时间,防止连续快速旋转
if (Time.time - lastRotateTime >= rotateCooldown)
{
lastRotateTime = Time.time;
Rotate90();
Debug.Log($"右手碰触卡槽中的碎片 {fragmentId},自动旋转");
}
}
Debug.Log($"右手进入碎片 {fragmentId} 触发器范围");
}
}
}
private void OnTriggerExit(Collider other)
{
// 恢复材质
if (isInSlot && !isLocked && !isGrabbed)
// 右手离开触发器范围
if (!isLocked && !isGrabbed)
{
RightHand rightHand = other.GetComponent<RightHand>();
if (rightHand != null)
{
rightHandInTrigger = false;
// 恢复正常材质
if (fragmentRenderer != null && normalMaterial != null)
{
fragmentRenderer.material = normalMaterial;
}
Debug.Log($"右手离开碎片 {fragmentId} 触发器范围");
}
}
}