This commit is contained in:
2025-09-09 14:23:57 +02:00
7 changed files with 296 additions and 76 deletions

View File

@@ -9,7 +9,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 3823830588451517910}
- component: {fileID: 5561047086518554858}
- component: {fileID: 8910846343857380832}
- component: {fileID: 5148042112194028162}
- component: {fileID: 2999879259114430221}
@@ -40,33 +39,6 @@ Transform:
- {fileID: 3792254836612903466}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!50 &5561047086518554858
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4157358163210553531}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_GravityScale: 0
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 1
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 4
--- !u!70 &8910846343857380832
CapsuleCollider2D:
m_ObjectHideFlags: 0
@@ -116,6 +88,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2ecb5bf6d8f447368687404e1b24278d, type: 3}
m_Name:
m_EditorClassIdentifier:
obstacleMask:
serializedVersion: 2
m_Bits: 576
colliderRadius: 1
--- !u!114 &2999879259114430221
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -160,8 +136,8 @@ MonoBehaviour:
radius: 3
height: 2
canMove: 1
maxSpeed: 20
gravity: {x: NaN, y: NaN, z: NaN}
maxSpeed: 25
gravity: {x: 0, y: 0, z: 0}
groundMask:
serializedVersion: 2
m_Bits: 4294967295
@@ -283,11 +259,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7877460049793670011, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
propertyPath: m_LocalPosition.x
value: 0.3
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7877460049793670011, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
propertyPath: m_LocalPosition.y
value: 1.6
value: -1
objectReference: {fileID: 0}
- target: {fileID: 7877460049793670011, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
propertyPath: m_LocalPosition.z

View File

@@ -137,7 +137,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -112.10999
value: -109.81999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -211,7 +211,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -109.56999
value: -107.27999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -654,7 +654,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -91.38
value: -89.09
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -1139,7 +1139,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -112.02
value: -109.729996
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -256089,6 +256089,16 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -85, y: 35, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -84, y: 35, z: 0}
second:
serializedVersion: 2
@@ -258309,6 +258319,16 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -85, y: 36, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -84, y: 36, z: 0}
second:
serializedVersion: 2
@@ -260529,6 +260549,16 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -85, y: 37, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -84, y: 37, z: 0}
second:
serializedVersion: 2
@@ -262749,6 +262779,16 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -85, y: 38, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -84, y: 38, z: 0}
second:
serializedVersion: 2
@@ -269439,6 +269479,16 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -84, y: 41, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -83, y: 41, z: 0}
second:
serializedVersion: 2
@@ -271659,6 +271709,16 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -84, y: 42, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -83, y: 42, z: 0}
second:
serializedVersion: 2
@@ -299179,6 +299239,16 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -7, y: 54, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -6, y: 54, z: 0}
second:
serializedVersion: 2
@@ -427381,7 +427451,7 @@ Tilemap:
m_AllTileFlags: 1073741825
m_AnimatedTiles: {}
m_TileAssetArray:
- m_RefCount: 41934
- m_RefCount: 41941
m_Data: {fileID: 11400000, guid: 947eb38d48ece064da924975bea695ff, type: 2}
- m_RefCount: 269
m_Data: {fileID: 11400000, guid: 07d871749103c144ea29788f769b5513, type: 2}
@@ -427398,7 +427468,7 @@ Tilemap:
- m_RefCount: 2
m_Data: {fileID: 11400000, guid: 6a5a99dba1b72ed4d90c121b255f9fd6, type: 2}
m_TileSpriteArray:
- m_RefCount: 41934
- m_RefCount: 41941
m_Data: {fileID: -1391011626, guid: 7146f6cf601588646afbc46121dc5306, type: 3}
- m_RefCount: 269
m_Data: {fileID: -58245721, guid: 7146f6cf601588646afbc46121dc5306, type: 3}
@@ -427415,7 +427485,7 @@ Tilemap:
- m_RefCount: 2
m_Data: {fileID: 1007120440, guid: 7146f6cf601588646afbc46121dc5306, type: 3}
m_TileMatrixArray:
- m_RefCount: 42586
- m_RefCount: 42593
m_Data:
e00: 1
e01: 0
@@ -427434,7 +427504,7 @@ Tilemap:
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 42586
- m_RefCount: 42593
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_TileObjectToInstantiateArray: []
m_AnimationFrameRate: 1
@@ -427531,7 +427601,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -112.96
value: -110.67
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -427613,7 +427683,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -108.21999
value: -105.92999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -427745,11 +427815,20 @@ PrefabInstance:
propertyPath: m_Name
value: Player
objectReference: {fileID: 0}
- target: {fileID: 5148042112194028162, guid: 301b4e0735896334f8f6fb9a68a7e419, type: 3}
propertyPath: colliderRadius
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5148042112194028162, guid: 301b4e0735896334f8f6fb9a68a7e419, type: 3}
propertyPath: obstacleMask.m_Bits
value: 576
objectReference: {fileID: 0}
- target: {fileID: 7393789300602426170, guid: 301b4e0735896334f8f6fb9a68a7e419, type: 3}
propertyPath: maxSpeed
value: 25
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 5561047086518554858, guid: 301b4e0735896334f8f6fb9a68a7e419, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
@@ -427847,7 +427926,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2064225848720495177, guid: 0bbded61e58193848ac59c8eea761bcc, type: 3}
propertyPath: m_LocalPosition.y
value: -85.479996
value: -83.189995
objectReference: {fileID: 0}
- target: {fileID: 2064225848720495177, guid: 0bbded61e58193848ac59c8eea761bcc, type: 3}
propertyPath: m_LocalPosition.z
@@ -427999,7 +428078,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -105.74
value: -103.45
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -428270,11 +428349,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.x
value: 27.79
value: 30.7
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -114.60999
value: -108.7
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -429400,7 +429479,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -108.89
value: -106.6
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -430210,7 +430289,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -101.56999
value: -99.27999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -430485,7 +430564,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -112.46999
value: -110.17999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -430810,7 +430889,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -113.92999
value: -111.63999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -431484,7 +431563,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -109.56999
value: -107.27999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -431566,7 +431645,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -113.02
value: -110.729996
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -432635,7 +432714,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -109.85999
value: -107.56999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -432717,7 +432796,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -111.96999
value: -109.67999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -432865,7 +432944,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -108.88
value: -106.59
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -433017,7 +433096,7 @@ PrefabInstance:
objectReference: {fileID: 11400000, guid: 5861b0a3b22b57f43a00cab7c7faafaa, type: 2}
- target: {fileID: 1498439134679474750, guid: 93ab59741ddc4e045a61cd8e05b65578, type: 3}
propertyPath: m_Name
value: Diving for Pictures
value: DivingForPictures
objectReference: {fileID: 0}
- target: {fileID: 4428217320659622763, guid: 93ab59741ddc4e045a61cd8e05b65578, type: 3}
propertyPath: m_LocalScale.x
@@ -434378,6 +434457,18 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
stepData: {fileID: 11400000, guid: 8ac614a698631554ab8ac39aed04a189, type: 2}
--- !u!114 &1182494941
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1182494929}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 833a4ccef651449e973e623d9107bef5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1192177492
PrefabInstance:
m_ObjectHideFlags: 0
@@ -435243,7 +435334,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -109.689995
value: -107.399994
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -435543,7 +435634,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -110.95
value: -108.659996
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -435987,7 +436078,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -112.979996
value: -110.689995
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -436774,7 +436865,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -107.2
value: -104.909996
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -437948,7 +438039,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -110.079994
value: -107.78999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -438243,7 +438334,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -97.67999
value: -95.38999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -438658,7 +438749,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -112.46999
value: -110.17999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -438732,7 +438823,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -104.999374
value: -102.70937
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -439908,7 +439999,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -109.74999
value: -107.45999
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -440199,7 +440290,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.y
value: -112.1
value: -109.81
objectReference: {fileID: 0}
- target: {fileID: 5145306031820616614, guid: fbbe1f4baf226904b96f839fe0c00181, type: 3}
propertyPath: m_LocalPosition.z
@@ -440530,13 +440621,17 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2788039117732113137, guid: b0d90c8a07405f24489d3a27d10d9bf9, type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7219454279404501638, guid: b0d90c8a07405f24489d3a27d10d9bf9, type: 3}
propertyPath: m_LocalPosition.x
value: 28.8
value: 22.81
objectReference: {fileID: 0}
- target: {fileID: 7219454279404501638, guid: b0d90c8a07405f24489d3a27d10d9bf9, type: 3}
propertyPath: m_LocalPosition.y
value: 6.6
value: 6.21
objectReference: {fileID: 0}
- target: {fileID: 7219454279404501638, guid: b0d90c8a07405f24489d3a27d10d9bf9, type: 3}
propertyPath: m_LocalPosition.z
@@ -440909,6 +441004,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 559682481520161959, guid: 13a913bd64e31434d9219cb7b25983bb, type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2275331752111533410, guid: 13a913bd64e31434d9219cb7b25983bb, type: 3}
propertyPath: m_Name
value: Headband
@@ -441320,6 +441419,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7237582673837831226, guid: 7417c748792f0d0439b6777e52faad89, type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -441399,6 +441502,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 7379304988657006554, guid: c36b48a324dcaef4cb5ee0f8ca57f0d6, type: 3}
insertIndex: -1
addedObject: {fileID: 1182494937}
- targetCorrespondingSourceObject: {fileID: 7379304988657006554, guid: c36b48a324dcaef4cb5ee0f8ca57f0d6, type: 3}
insertIndex: -1
addedObject: {fileID: 1182494941}
m_SourcePrefab: {fileID: 100100000, guid: c36b48a324dcaef4cb5ee0f8ca57f0d6, type: 3}
--- !u!1001 &7535757761066548300
PrefabInstance:
@@ -441600,13 +441706,17 @@ PrefabInstance:
propertyPath: m_Name
value: BurgerBuns
objectReference: {fileID: 0}
- target: {fileID: 1806322732885125293, guid: e660bbbe18c2a044f9f066822a6fd703, type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4092047856540417737, guid: e660bbbe18c2a044f9f066822a6fd703, type: 3}
propertyPath: m_LocalPosition.x
value: -8.66
value: -12.46
objectReference: {fileID: 0}
- target: {fileID: 4092047856540417737, guid: e660bbbe18c2a044f9f066822a6fd703, type: 3}
propertyPath: m_LocalPosition.y
value: -19.33
value: -22.38
objectReference: {fileID: 0}
- target: {fileID: 4092047856540417737, guid: e660bbbe18c2a044f9f066822a6fd703, type: 3}
propertyPath: m_LocalPosition.z
@@ -441653,6 +441763,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 926279644969566300, guid: e3787cc7469b6d545a0e0f4f035b804f, type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3895418227164651770, guid: e3787cc7469b6d545a0e0f4f035b804f, type: 3}
propertyPath: m_LocalPosition.x
value: 65.52

View File

@@ -16,6 +16,9 @@ namespace Input
private Vector2 lastHoldPosition;
private Coroutine pathfindingDragCoroutine;
private float pathfindingDragUpdateInterval = 0.1f; // Interval in seconds
[Header("Collision Simulation")]
public LayerMask obstacleMask;
public float colliderRadius = 0.5f;
// --- Unity/Component References ---
private AIPath aiPath;
@@ -23,6 +26,7 @@ namespace Input
// Note: String-based property lookup is flagged as inefficient, but is common in Unity for dynamic children.
private Animator animator;
private Transform artTransform;
private SpriteRenderer spriteRenderer;
// --- MoveToAndNotify State ---
public delegate void ArrivedAtTargetHandler();
@@ -39,6 +43,11 @@ namespace Input
animator = artTransform.GetComponent<Animator>();
else
animator = GetComponentInChildren<Animator>();
// Cache SpriteRenderer for flipping
if (artTransform != null)
spriteRenderer = artTransform.GetComponent<SpriteRenderer>();
if (spriteRenderer == null)
spriteRenderer = GetComponentInChildren<SpriteRenderer>();
}
void Start()
@@ -147,21 +156,64 @@ namespace Input
/// </summary>
private void MoveDirectlyTo(Vector2 worldPosition)
{
if (aiPath == null) return;
if (aiPath == null)
{
return;
}
Vector3 current = transform.position;
Vector3 target = new Vector3(worldPosition.x, worldPosition.y, current.z);
Vector3 toTarget = (target - current);
Vector3 direction = toTarget.normalized;
float maxSpeed = aiPath.maxSpeed;
float acceleration = aiPath.maxAcceleration;
directMoveVelocity =
Vector3.MoveTowards(directMoveVelocity, direction * maxSpeed, acceleration * Time.deltaTime);
directMoveVelocity = Vector3.MoveTowards(directMoveVelocity, direction * maxSpeed, acceleration * Time.deltaTime);
if (directMoveVelocity.magnitude > maxSpeed)
{
directMoveVelocity = directMoveVelocity.normalized * maxSpeed;
}
Vector3 move = directMoveVelocity * Time.deltaTime;
if (move.magnitude > toTarget.magnitude)
{
move = toTarget;
transform.position += move;
}
// --- Collision simulation ---
Vector3 adjustedVelocity = AdjustVelocityForObstacles(current, directMoveVelocity);
Vector3 adjustedMove = adjustedVelocity * Time.deltaTime;
if (adjustedMove.magnitude > toTarget.magnitude)
{
adjustedMove = toTarget;
}
transform.position += adjustedMove;
}
/// <summary>
/// Simulates collision with obstacles by raycasting in the direction of velocity and projecting the velocity if a collision is detected.
/// </summary>
/// <param name="position">Player's current position.</param>
/// <param name="velocity">Intended velocity for this frame.</param>
/// <returns>Adjusted velocity after collision simulation.</returns>
private Vector3 AdjustVelocityForObstacles(Vector3 position, Vector3 velocity)
{
if (velocity.sqrMagnitude < 0.0001f)
return velocity;
float moveDistance = velocity.magnitude * Time.deltaTime;
Vector2 origin = new Vector2(position.x, position.y);
Vector2 dir = velocity.normalized;
float rayLength = colliderRadius + moveDistance;
RaycastHit2D hit = Physics2D.Raycast(origin, dir, rayLength, obstacleMask);
Debug.DrawLine(origin, origin + dir * rayLength, Color.red, 0.1f);
if (hit.collider != null)
{
// Draw normal and tangent for debug
Debug.DrawLine(hit.point, hit.point + hit.normal, Color.green, 0.2f);
Vector2 tangent = new Vector2(-hit.normal.y, hit.normal.x);
Debug.DrawLine(hit.point, hit.point + tangent, Color.blue, 0.2f);
// Project velocity onto tangent to simulate sliding
float slideAmount = Vector2.Dot(velocity, tangent);
Vector3 slideVelocity = tangent * slideAmount;
return slideVelocity;
}
return velocity;
}
void Update()
@@ -169,16 +221,30 @@ namespace Input
if (animator != null && aiPath != null)
{
float normalizedSpeed = 0f;
Vector3 velocity = Vector3.zero;
if (isHolding && GameManager.Instance.DefaultHoldMovementMode == GameSettings.HoldMovementMode.Direct)
{
normalizedSpeed = directMoveVelocity.magnitude / aiPath.maxSpeed;
velocity = directMoveVelocity;
}
else if (aiPath.enabled)
{
normalizedSpeed = aiPath.velocity.magnitude / aiPath.maxSpeed;
velocity = aiPath.velocity;
}
animator.SetFloat("Speed", Mathf.Clamp01(normalizedSpeed));
SetSpriteFlip(velocity);
}
}
animator.SetFloat("Speed", Mathf.Clamp01(normalizedSpeed));
private void SetSpriteFlip(Vector3 velocity)
{
if (spriteRenderer != null && velocity.sqrMagnitude > 0.001f)
{
if (velocity.x > 0.01f)
spriteRenderer.flipX = false;
else if (velocity.x < -0.01f)
spriteRenderer.flipX = true;
}
}

View File

@@ -68,4 +68,9 @@ public class Interactable : MonoBehaviour, ITouchInputConsumer
}
return anySuccess;
}
public void CompleteInteraction(bool success)
{
InteractionComplete?.Invoke(success);
}
}

View File

@@ -0,0 +1,35 @@
using UnityEngine;
using System;
/// <summary>
/// MonoBehaviour that immediately completes an interaction when started.
/// </summary>
public class OneClickInteraction : MonoBehaviour
{
private Interactable interactable;
void Awake()
{
interactable = GetComponent<Interactable>();
if (interactable != null)
{
interactable.StartedInteraction += OnStartedInteraction;
}
}
void OnDestroy()
{
if (interactable != null)
{
interactable.StartedInteraction -= OnStartedInteraction;
}
}
private void OnStartedInteraction()
{
if (interactable != null)
{
interactable.CompleteInteraction(true);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 833a4ccef651449e973e623d9107bef5
timeCreated: 1757417586

View File

@@ -29,6 +29,7 @@ public class FollowerController : MonoBehaviour
private float _currentSpeed = 0f;
private Animator _animator;
private Transform _artTransform;
private SpriteRenderer spriteRenderer;
private PickupItemData _currentlyHeldItem;
public PickupItemData CurrentlyHeldItem => _currentlyHeldItem;
@@ -83,10 +84,12 @@ public class FollowerController : MonoBehaviour
if (_artTransform != null)
{
_animator = _artTransform.GetComponent<Animator>();
spriteRenderer = _artTransform.GetComponent<SpriteRenderer>();
}
else
{
_animator = GetComponentInChildren<Animator>(); // fallback
spriteRenderer = GetComponentInChildren<SpriteRenderer>();
}
}
@@ -181,6 +184,14 @@ public class FollowerController : MonoBehaviour
_currentSpeed = Mathf.Max(_currentSpeed, minSpeed);
}
Vector3 dir = (_targetPoint - transform.position).normalized;
// Sprite flipping based on movement direction
if (spriteRenderer != null && dir.sqrMagnitude > 0.001f)
{
if (dir.x > 0.01f)
spriteRenderer.flipX = false;
else if (dir.x < -0.01f)
spriteRenderer.flipX = true;
}
transform.position += dir * _currentSpeed * Time.deltaTime;
}
else
@@ -202,6 +213,14 @@ public class FollowerController : MonoBehaviour
else if (_aiPath != null)
{
normalizedSpeed = _aiPath.velocity.magnitude / _followerMaxSpeed;
// Sprite flipping for pathfinding mode
if (spriteRenderer != null && _aiPath.velocity.sqrMagnitude > 0.001f)
{
if (_aiPath.velocity.x > 0.01f)
spriteRenderer.flipX = false;
else if (_aiPath.velocity.x < -0.01f)
spriteRenderer.flipX = true;
}
}
_animator.SetFloat("Speed", Mathf.Clamp01(normalizedSpeed));
}
@@ -438,3 +457,5 @@ public class FollowerController : MonoBehaviour
}
}
}