The worker respects the splines now

This commit is contained in:
2025-12-05 15:49:06 +01:00
parent 82b1a1e78c
commit c96be39e64
4 changed files with 314 additions and 59 deletions

View File

@@ -318172,6 +318172,11 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!1 &1245824934 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5377715489692883818, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
m_PrefabInstance: {fileID: 2186331501986338647}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1252334950 --- !u!1 &1252334950
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -318603,6 +318608,11 @@ Animator:
m_CorrespondingSourceObject: {fileID: 5383043036581615591, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} m_CorrespondingSourceObject: {fileID: 5383043036581615591, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
m_PrefabInstance: {fileID: 2186331501986338647} m_PrefabInstance: {fileID: 2186331501986338647}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!4 &1295636264 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4357190152722936295, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
m_PrefabInstance: {fileID: 2186331501986338647}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1300830842 --- !u!1001 &1300830842
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -325614,11 +325624,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!4 &2006149453 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4457123275831970415, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
m_PrefabInstance: {fileID: 2186331501986338647}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2019787772 --- !u!1 &2019787772
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -327398,6 +327403,14 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 92683104288023533, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 4.5
objectReference: {fileID: 0}
- target: {fileID: 92683104288023533, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: -4.249999
objectReference: {fileID: 0}
- target: {fileID: 458415185846848580, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 458415185846848580, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_SortingOrder propertyPath: m_SortingOrder
value: 1 value: 1
@@ -327406,50 +327419,154 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: ForkLiftInteraction value: ForkLiftInteraction
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 589977156435861445, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: -0.02
objectReference: {fileID: 0}
- target: {fileID: 589977156435861445, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: -3.3
objectReference: {fileID: 0}
- target: {fileID: 1233009204864175835, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 46.59
objectReference: {fileID: 0}
- target: {fileID: 1233009204864175835, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: -5.78
objectReference: {fileID: 0}
- target: {fileID: 1250079128682334392, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 2.39
objectReference: {fileID: 0}
- target: {fileID: 1250079128682334392, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: -5.34
objectReference: {fileID: 0}
- target: {fileID: 1506551133505637708, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 1506551133505637708, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: AnchorB value: AnchorB
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2296390005725141326, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2296390005725141326, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2554232885907879347, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 2554232885907879347, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2589954018006005073, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 2589954018006005073, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_Sprite propertyPath: m_Sprite
value: value:
objectReference: {fileID: -9075458657767321858, guid: 6113a70fdffa15e498f283d01550c069, type: 3} objectReference: {fileID: -9075458657767321858, guid: 6113a70fdffa15e498f283d01550c069, type: 3}
- target: {fileID: 2589954018006005073, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_SortingOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3102897100191072367, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3102897100191072367, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_Sprite propertyPath: m_Sprite
value: value:
objectReference: {fileID: -772091242, guid: d031465f6fdffcd49b08f24a89b92062, type: 3} objectReference: {fileID: -772091242, guid: d031465f6fdffcd49b08f24a89b92062, type: 3}
- target: {fileID: 3102897100191072367, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3242836565465984131, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3242836565465984131, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.89 value: -17.84
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3242836565465984131, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3242836565465984131, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -4.94 value: 8.22
objectReference: {fileID: 0}
- target: {fileID: 3584311421929917149, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: -4.2799997
objectReference: {fileID: 0}
- target: {fileID: 3584311421929917149, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: 3.460001
objectReference: {fileID: 0}
- target: {fileID: 3587896760102657269, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: -4.5
objectReference: {fileID: 0}
- target: {fileID: 3587896760102657269, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: 4.25
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3672810868019658564, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3672810868019658564, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 1.78 value: -2.5599995
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3672810868019658564, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3672810868019658564, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -1.31 value: -6.249999
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3785502661120159249, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3785502661120159249, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -15.05 value: -11.26
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3785502661120159249, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3785502661120159249, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 15.86 value: -1.2
objectReference: {fileID: 0}
- target: {fileID: 3785502661120159249, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.z
value: 1.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3853023420029363366, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 3853023420029363366, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3886934123545681228, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: -8.9
objectReference: {fileID: 0}
- target: {fileID: 3886934123545681228, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: -0.34
objectReference: {fileID: 0}
- target: {fileID: 3886934123545681228, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.z
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 3954657295486381042, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 4.28
objectReference: {fileID: 0}
- target: {fileID: 3954657295486381042, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: -3.46
objectReference: {fileID: 0}
- target: {fileID: 4157393069671111901, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4157393069671111901, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4157393069671111901, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4157393069671111901, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4157393069671111901, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4157393069671111901, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4247295387199525262, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4247295387199525262, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: AnchorA value: AnchorA
@@ -327466,38 +327583,70 @@ PrefabInstance:
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4449088564554718780, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: workerBeltObject
value:
objectReference: {fileID: 1245824934}
- target: {fileID: 4457123275831970415, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4457123275831970415, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -14.32 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4457123275831970415, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4457123275831970415, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 23.52 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4620273327437468163, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_SortingOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4844309227962071648, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: workerBeltObject
value:
objectReference: {fileID: 1245824934}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.size propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.size
value: 1 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Mode propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[1].m_Mode
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Target propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value: value:
objectReference: {fileID: 454801178} objectReference: {fileID: 454801178}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[1].m_Target
value:
objectReference: {fileID: 1295636262}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_CallState propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[1].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: ChangeState value: ChangeState
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName
value: set_enabled
objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: Core.SaveLoad.AppleMachine, AppleHillsScripts value: Core.SaveLoad.AppleMachine, AppleHillsScripts
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName
value: UnityEngine.Animator, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgument propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgument
value: value:
@@ -327506,22 +327655,74 @@ PrefabInstance:
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.GameObject, UnityEngine value: UnityEngine.GameObject, UnityEngine
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4883153820997006706, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalScale.x
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalScale.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalScale.z
value: 0.48
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 0.09
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: -0.02
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9974974
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalRotation.z
value: -0.070703916
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -8.109
objectReference: {fileID: 0}
- target: {fileID: 4928472349675920202, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5011845812302690511, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 5011845812302690511, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5057217536574039096, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 5057217536574039096, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 19.64 value: -12.62
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5057217536574039096, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 5057217536574039096, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -4.35 value: -8.79
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5377715489692883818, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 5377715489692883818, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: WalkingWorker value: WalkingWorker
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: approachDelay
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: workerAnimator propertyPath: workerAnimator
value: value:
@@ -327530,6 +327731,10 @@ PrefabInstance:
propertyPath: approachduration propertyPath: approachduration
value: 3 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: workerBeltObject
value:
objectReference: {fileID: 1245824934}
- target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: workerBeltRoamingRef propertyPath: workerBeltRoamingRef
value: value:
@@ -327537,7 +327742,7 @@ PrefabInstance:
- target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: workerObjectTransform propertyPath: workerObjectTransform
value: value:
objectReference: {fileID: 2006149453} objectReference: {fileID: 1295636264}
- target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 6000867473922782922, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: workerBeltStateMAchineRef propertyPath: workerBeltStateMAchineRef
value: value:
@@ -327566,17 +327771,33 @@ PrefabInstance:
propertyPath: m_ConstrainProportionsScale propertyPath: m_ConstrainProportionsScale
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6372844669917647974, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: -2.3899984
objectReference: {fileID: 0}
- target: {fileID: 6372844669917647974, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: 5.34
objectReference: {fileID: 0}
- target: {fileID: 6513879170535588136, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x
value: 0.019992828
objectReference: {fileID: 0}
- target: {fileID: 6513879170535588136, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y
value: 3.2999988
objectReference: {fileID: 0}
- target: {fileID: 7035779985758040736, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7035779985758040736, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7338175006250910518, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7338175006250910518, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -1.7800006 value: 2.56
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7338175006250910518, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7338175006250910518, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 1.3100004 value: 6.25
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7488072885374278401, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7488072885374278401, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_Controller propertyPath: m_Controller
@@ -327584,11 +327805,11 @@ PrefabInstance:
objectReference: {fileID: 9100000, guid: fd49be538e07fb744860136761ab144f, type: 2} objectReference: {fileID: 9100000, guid: fd49be538e07fb744860136761ab144f, type: 2}
- target: {fileID: 7508847384281937588, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7508847384281937588, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 1.55 value: 3.3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7508847384281937588, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7508847384281937588, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 2.31 value: 11.78
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7558457198582461538, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7558457198582461538, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@@ -327636,19 +327857,19 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7759211224397440031, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7759211224397440031, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.3 value: -11.26
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7759211224397440031, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7759211224397440031, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -7.54 value: -1.2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7842440814220139303, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7842440814220139303, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0.05 value: -11.87
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7842440814220139303, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7842440814220139303, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -2.18 value: 0.26
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7848397806898645977, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3} - target: {fileID: 7848397806898645977, guid: 1c956b50a36cb0d409d69df3a59377b2, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x

View File

@@ -19,11 +19,11 @@ public class WorkerBeltApproachingBehaviour : AppleState
private void OnEnable() private void OnEnable()
{ {
// ensure roaming ref exists before accessing
Transform anchorB = transform.Find("AnchorA"); Transform anchorA = transform.Find("AnchorA");
if (anchorB != null) if (anchorA != null && workerBeltRoamingRef != null)
{ {
anchorB.position = workerBeltRoamingRef.midRoamPosition; anchorA.position = workerBeltRoamingRef.midRoamPosition;
} }
Debug.Log("Entered Worker Belt Approaching State"); Debug.Log("Entered Worker Belt Approaching State");
@@ -50,6 +50,9 @@ public class WorkerBeltApproachingBehaviour : AppleState
private void OnDisable() private void OnDisable()
{ {
Debug.Log("Exited Worker Belt Approaching State"); Debug.Log("Exited Worker Belt Approaching State");
// stop active tween to avoid it running while disabled
aproachTween?.Stop();
aproachTween = null;
} }
// callback implementations // callback implementations
@@ -63,15 +66,24 @@ public class WorkerBeltApproachingBehaviour : AppleState
Debug.Log("Approach tween finished"); Debug.Log("Approach tween finished");
// cleanup // cleanup
aproachTween?.Stop(); aproachTween?.Stop();
aproachTween = null;
if (workerAnimator != null)
workerAnimator.SetBool("isLifting?", true); workerAnimator.SetBool("isLifting?", true);
if (workerBeltStateMAchineRef != null)
workerBeltStateMAchineRef.ChangeState(2); workerBeltStateMAchineRef.ChangeState(2);
} }
public void Update() public void Update()
{ {
if (ApproachingSpline.GetDirection(aproachTween.Percentage).x > 0.1) if (ApproachingSpline == null || aproachTween == null)
workerAnimator.SetBool("walkingRight?", true); return;
// defensively clamp percentage
float pct = Mathf.Clamp01(aproachTween.Percentage);
Vector3 dir = ApproachingSpline.GetDirection(pct);
if (dir.x > 0.1f)
workerAnimator?.SetBool("walkingRight?", true);
else else
workerAnimator.SetBool("walkingRight?", false); workerAnimator?.SetBool("walkingRight?", false);
} }
} }

View File

@@ -25,7 +25,9 @@ public class WorkerBeltRoamingBehaviour : AppleState
void OnEnable() void OnEnable()
{ {
if (workerAnimator != null)
workerAnimator.SetBool("isLifting?", false); workerAnimator.SetBool("isLifting?", false);
Debug.Log("Entered Worker Belt Roaming State"); Debug.Log("Entered Worker Belt Roaming State");
if (RoamingSpline == null || workerObjectTransform == null) if (RoamingSpline == null || workerObjectTransform == null)
@@ -46,35 +48,47 @@ public class WorkerBeltRoamingBehaviour : AppleState
// Also stop the tween if the GameObject is disabled for any reason (covers StateMachine deactivation) // Also stop the tween if the GameObject is disabled for any reason (covers StateMachine deactivation)
void OnDisable() void OnDisable()
{ {
if (workerObjectTransform != null)
midRoamPosition = workerObjectTransform.position; midRoamPosition = workerObjectTransform.position;
Debug.Log("WorkerBeltRoamingBehaviour: OnExitState - stopping roaming tween" + midRoamPosition); Debug.Log("WorkerBeltRoamingBehaviour: Stopping roaming tween " + midRoamPosition);
roamingTween?.Stop(); roamingTween?.Stop();
roamingTween = null;
if (pantsRoutine != null)
{
StopCoroutine(pantsRoutine);
pantsRoutine = null;
}
} }
public void Update() public void Update()
{ {
if (RoamingSpline.GetDirection(roamingTween.Percentage).x > 0.1) if (RoamingSpline == null || roamingTween == null)
workerAnimator.SetBool("walkingRight?", true); return;
float pct = Mathf.Clamp01(roamingTween.Percentage);
Vector3 dir = RoamingSpline.GetDirection(pct);
if (dir.x > 0.1f)
workerAnimator?.SetBool("walkingRight?", true);
else else
workerAnimator.SetBool("walkingRight?", false); workerAnimator?.SetBool("walkingRight?", false);
} }
IEnumerator RandomFallChance() IEnumerator RandomFallChance()
{ {
while (pantsLess) while (pantsLess)
{
yield return new WaitForSeconds(2); yield return new WaitForSeconds(2);
CheckForFall(); CheckForFall();
}
} }
public void CheckForFall() public void CheckForFall()
{ {
int _randNumber; // 5% chance to fall each check
_randNumber = Random.Range(0, 1); if (Random.value < 0.05f)
if (_randNumber > 5)
{ {
workerAnimator.SetTrigger("shouldFall?"); workerAnimator?.SetTrigger("shouldFall?");
} }
} }
@@ -83,6 +97,7 @@ public class WorkerBeltRoamingBehaviour : AppleState
if (pantsRoutine != null) if (pantsRoutine != null)
{ {
StopCoroutine(pantsRoutine); StopCoroutine(pantsRoutine);
pantsRoutine = null;
} }
} }

View File

@@ -20,26 +20,29 @@ public class WorkerBeltReturningBehaviour : AppleState
private void OnEnable() private void OnEnable()
{ {
if (roamingWorker != null)
roamingWorker.SetActive(true); roamingWorker.SetActive(true);
Transform anchorA = transform.Find("AnchorA"); Transform anchorA = transform.Find("AnchorA");
if (anchorA != null) if (anchorA != null && StartingAnchor != null)
{ {
anchorA.position = StartingAnchor.position; anchorA.position = StartingAnchor.position;
} }
Transform anchorB = transform.Find("AnchorB"); Transform anchorB = transform.Find("AnchorB");
if (anchorB != null) if (anchorB != null && EndingAnchor != null)
{ {
anchorB.position = EndingAnchor.position; anchorB.position = EndingAnchor.position;
} }
if (workerAnimator != null)
workerAnimator.SetBool("isLifting?", false); workerAnimator.SetBool("isLifting?", false);
Debug.Log("Entered Worker Belt Returning State"); Debug.Log("Entered Worker Belt Returning State");
if (ReturningSpline == null || workerObjectTransform == null) if (ReturningSpline == null || workerObjectTransform == null)
{ {
Debug.LogWarning("WorkerBeltApproachingBehaviour: ApproachingSpline or workerObjectTransform is not assigned.", this); Debug.LogWarning("WorkerBeltReturningBehaviour: ReturningSpline or workerObjectTransform is not assigned.", this);
return; return;
} }
// Start the tween to move the worker along the approaching spline // Start the tween to move the worker along the returning spline
returnTween = Tween.Spline( returnTween = Tween.Spline(
ReturningSpline, ReturningSpline,
workerObjectTransform, workerObjectTransform,
@@ -49,28 +52,32 @@ public class WorkerBeltReturningBehaviour : AppleState
returnDelay, returnDelay,
Tween.EaseLinear, Tween.EaseLinear,
Tween.LoopType.None, Tween.LoopType.None,
HandleApproachStarted, // optional HandleReturnStarted, // optional
HandleApproachFinished // called when spline completes HandleReturnFinished // called when spline completes
); );
} }
private void OnDisable() private void OnDisable()
{ {
Debug.Log("Exited Worker Belt Returning State"); Debug.Log("Exited Worker Belt Returning State");
returnTween?.Stop();
returnTween = null;
} }
// callback implementations // callback implementations
void HandleApproachStarted() void HandleReturnStarted()
{ {
// optional: play audio/anim etc. // optional: play audio/anim etc.
} }
void HandleApproachFinished() void HandleReturnFinished()
{ {
Debug.Log("Return tween finished"); Debug.Log("Return tween finished");
// cleanup // cleanup
returnTween?.Stop(); returnTween?.Stop();
returnTween = null;
if (workerBeltStateMAchineRef != null)
workerBeltStateMAchineRef.ChangeState(0); workerBeltStateMAchineRef.ChangeState(0);
} }
} }