From c02f1c4826f95b60d20ff319e255af2648007303 Mon Sep 17 00:00:00 2001 From: aarthificial Date: Sat, 9 Dec 2023 01:18:39 +0100 Subject: [PATCH] feat: final touches --- .../Player/Models/PlayerAnimator.controller | 26 +++++++++---------- Assets/Player/PlayerController.cs | 7 ++--- Assets/Typewriter/Tables/LoadingDocs.asset | 18 +++++++++++++ Assets/Typewriter/Tables/LoadingDocs.tw | 8 ++++-- 4 files changed, 41 insertions(+), 18 deletions(-) diff --git a/Assets/Player/Models/PlayerAnimator.controller b/Assets/Player/Models/PlayerAnimator.controller index c24dc2b..c4f4015 100644 --- a/Assets/Player/Models/PlayerAnimator.controller +++ b/Assets/Player/Models/PlayerAnimator.controller @@ -11,7 +11,7 @@ AnimatorController: m_AnimatorParameters: - m_Name: speed m_Type: 1 - m_DefaultFloat: 1 + m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 m_Controller: {fileID: 0} @@ -50,11 +50,11 @@ AnimatorState: m_CycleOffsetParameterActive: 0 m_TimeParameterActive: 0 m_Motion: {fileID: 8149319799317669181} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: --- !u!206 &1510578230492688263 BlendTree: m_ObjectHideFlags: 1 @@ -111,18 +111,18 @@ AnimatorState: m_TimeParameterActive: 0 m_Motion: {fileID: -203655887218126122, guid: 0b87f89d01130104cb97229365e5a116, type: 3} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: --- !u!1101 &5511037503630015393 AnimatorStateTransition: m_ObjectHideFlags: 1 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: + m_Name: m_Conditions: - m_ConditionMode: 3 m_ConditionEvent: speed @@ -172,7 +172,7 @@ AnimatorStateTransition: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: + m_Name: m_Conditions: - m_ConditionMode: 4 m_ConditionEvent: speed diff --git a/Assets/Player/PlayerController.cs b/Assets/Player/PlayerController.cs index 2f23567..27c35d6 100644 --- a/Assets/Player/PlayerController.cs +++ b/Assets/Player/PlayerController.cs @@ -164,10 +164,11 @@ public void DrivenUpdate(bool isCurrent) { Config.RotationSpeed * Time.deltaTime ); - var speed = Agent.velocity.magnitude; + var velocity = Agent.velocity; + velocity.y = 0; + var speed = velocity.magnitude; if (Agent.remainingDistance > Agent.stoppingDistance + 1) { - speed = (Agent.velocity.magnitude + Agent.desiredVelocity.magnitude) - / 2f; + speed = (speed + Agent.desiredVelocity.magnitude) / 2f; } _speedFactor = Mathf.Lerp( diff --git a/Assets/Typewriter/Tables/LoadingDocs.asset b/Assets/Typewriter/Tables/LoadingDocs.asset index 2548a81..26b6734 100644 --- a/Assets/Typewriter/Tables/LoadingDocs.asset +++ b/Assets/Typewriter/Tables/LoadingDocs.asset @@ -11778,6 +11778,11 @@ MonoBehaviour: Min: 0 Max: 0 Operation: 0 + - FactReference: + InternalID: 1389734 + Min: 0 + Max: 0 + Operation: 0 - FactReference: InternalID: -514433065 Min: 1 @@ -11788,6 +11793,10 @@ MonoBehaviour: InternalID: 1389004 Value: 1 Operation: 0 + - FactReference: + InternalID: 1389734 + Value: 1 + Operation: 0 OnApply: [] OnInvoke: [] Content: It looks like this could be a way to get into the building. @@ -13940,6 +13949,11 @@ MonoBehaviour: Min: 0 Max: 0 Operation: 0 + - FactReference: + InternalID: 1389735 + Min: 0 + Max: 0 + Operation: 0 - FactReference: InternalID: -95002655 Min: 1 @@ -13950,6 +13964,10 @@ MonoBehaviour: InternalID: 1389003 Value: 1 Operation: 0 + - FactReference: + InternalID: 1389735 + Value: 1 + Operation: 0 OnApply: [] OnInvoke: [] Content: Looks like one of those gates they use for shipping-and-receiving diff --git a/Assets/Typewriter/Tables/LoadingDocs.tw b/Assets/Typewriter/Tables/LoadingDocs.tw index 79073e6..b739236 100644 --- a/Assets/Typewriter/Tables/LoadingDocs.tw +++ b/Assets/Typewriter/Tables/LoadingDocs.tw @@ -543,7 +543,9 @@ L_ask_bay_2_box_dark_here_2",bay_2_R_saw_box < 1,,,1, L_ask_bay_2_box_dark_learns_2,speech,dialogue,RT,,FALSE,FALSE,"Back up a bit, let me look at this.",,,,,0, L_ask_bay_2_box_dark_learns_3,speech,dialogue,LT,,FALSE,FALSE,"Oh, sorry.",,,,,0, L_ask_bay_2_box_dark_learns_4,speech,dialogue,RT,,FALSE,FALSE,"Mm. Right, let's see...",,,,,0, -L_ask_bay_2_box_dark_learns_A_1,thought,dialogue,RT,,FALSE,FALSE,It looks like this could be a way to get into the building.,L_ask_bay_2_box_dark_learns_4,bay_R_identified_bays = 0,bay_R_identified_bays = 1,,1, +L_ask_bay_2_box_dark_learns_A_1,thought,dialogue,RT,,FALSE,FALSE,It looks like this could be a way to get into the building.,L_ask_bay_2_box_dark_learns_4,"bay_R_identified_bays = 0 +bay_R_identified = 0","bay_R_identified_bays = 1 +bay_R_identified = 1",,2, L_ask_bay_2_box_dark_learns_A_2,thought,dialogue,RT,,FALSE,FALSE,"The wall here is replaced by a garage door, which is covered by a scissor gate.",,,,,0, L_ask_bay_2_box_dark_learns_A_3,thought,dialogue,RT,,FALSE,FALSE,"Judging by the lights, it's powered, but... faulty, in some way.",,,,,0, L_ask_bay_2_box_dark_learns_A_4,thought,dialogue,RT,,FALSE,FALSE,Which would explain why this service box is open.,,,bay_2_R_saw_box = 1,,0, @@ -633,7 +635,9 @@ R_ask_bay_2_box_dark_knows_2,speech,dialogue,LT,,FALSE,FALSE,Oh. In the box?,,,, R_ask_bay_2_box_dark_learns_1,speech,dialogue,LT,,FALSE,FALSE,Uhh... Gimme a sec.,"R_ask_bay_2_box_dark_away_4 R_ask_bay_2_box_dark_here_4",bay_2_L_saw_box < 1,,,1, R_ask_bay_2_box_dark_learns_2,thought,dialogue,LT,,FALSE,FALSE,"What's going on, here?",,,,,0, -R_ask_bay_2_box_dark_learns_A_1,thought,dialogue,LT,,FALSE,FALSE,Looks like one of those gates they use for shipping-and-receiving stuff.,R_ask_bay_2_box_dark_learns_2,bay_L_identified_bays = 0,bay_L_identified_bays = 1,,1, +R_ask_bay_2_box_dark_learns_A_1,thought,dialogue,LT,,FALSE,FALSE,Looks like one of those gates they use for shipping-and-receiving stuff.,R_ask_bay_2_box_dark_learns_2,"bay_L_identified_bays = 0 +bay_L_identified = 0","bay_L_identified_bays = 1 +bay_L_identified = 1",,2, R_ask_bay_2_box_dark_learns_A_2,thought,dialogue,LT,,FALSE,FALSE,"You back a big-rig into it, and the trailer slots right in.",,,,,0, R_ask_bay_2_box_dark_learns_A_3,thought,dialogue,LT,,FALSE,FALSE,Lets 'em load and unload straight into the building.,,,,,0, R_ask_bay_2_box_dark_learns_A_4,thought,dialogue,LT,,FALSE,FALSE,The gate's closed...,,,,,0,