From 3586ee1e48500d47cd786f3a0f9d0d72e2be6fb9 Mon Sep 17 00:00:00 2001 From: sebastianhampel1 Date: Mon, 3 Apr 2023 23:22:37 -0400 Subject: [PATCH] small fixes --- .../mixamorig_Hips.controller | 42 +++++++++++++++---- Assets/Scripts/Item/DoorInteractable.cs | 2 +- .../Player/PlayerAnimationController.cs | 1 + .../Player/PlayerInteractionHandler.cs | 2 +- 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/Assets/Animations/PlayerAnimations/mixamorig_Hips.controller b/Assets/Animations/PlayerAnimations/mixamorig_Hips.controller index f26f8bc..8decd4a 100644 --- a/Assets/Animations/PlayerAnimations/mixamorig_Hips.controller +++ b/Assets/Animations/PlayerAnimations/mixamorig_Hips.controller @@ -147,6 +147,31 @@ AnimatorStateTransition: m_InterruptionSource: 1 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 +--- !u!1101 &-7319978620292223939 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: IsCarrying + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 8938630608892816499} + m_DstState: {fileID: 0} + m_Solo: 1 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.1 + m_TransitionOffset: 0 + m_ExitTime: 0.8026316 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 1 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!1102 &-7311682644873015274 AnimatorState: serializedVersion: 6 @@ -238,7 +263,7 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 8893430160655615906} - m_Position: {x: 310, y: 170, z: 0} + m_Position: {x: 350, y: 210, z: 0} - serializedVersion: 1 m_State: {fileID: 4477047308251105033} m_Position: {x: 290, y: 70, z: 0} @@ -878,31 +903,31 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 1 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: RunningSpeed m_Type: 1 m_DefaultFloat: 1 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: SideSpeed m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: IsCarrying m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: HasGun m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -977,7 +1002,7 @@ AnimatorStateTransition: m_ExitTime: 0.975 m_HasExitTime: 0 m_HasFixedDuration: 1 - m_InterruptionSource: 1 + m_InterruptionSource: 2 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 --- !u!1101 &805240443258737219 @@ -1457,6 +1482,7 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: -7329068066951733316} + - {fileID: -7319978620292223939} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -1479,7 +1505,7 @@ AnimatorStateMachine: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: CarryingLayer + m_Name: MainLayer m_ChildStates: - serializedVersion: 1 m_State: {fileID: -2941754148986728630} diff --git a/Assets/Scripts/Item/DoorInteractable.cs b/Assets/Scripts/Item/DoorInteractable.cs index 541a074..82f0268 100644 --- a/Assets/Scripts/Item/DoorInteractable.cs +++ b/Assets/Scripts/Item/DoorInteractable.cs @@ -91,7 +91,7 @@ public class DoorInteractable : HeavyItemReceiver else if(insertedCore!=null&&heavyInvent==null) { heavyInvent = insertedCore; - print("Picked up:" + heavyInvent.name); + insertedCore = null; //get ref of player perhaps return true; diff --git a/Assets/Scripts/Player/PlayerAnimationController.cs b/Assets/Scripts/Player/PlayerAnimationController.cs index e71458a..ba8b5ed 100644 --- a/Assets/Scripts/Player/PlayerAnimationController.cs +++ b/Assets/Scripts/Player/PlayerAnimationController.cs @@ -54,6 +54,7 @@ public class PlayerAnimationController : MonoBehaviour { animController.SetBool("IsCarrying", interactionHandler.IsCarrying); animController.SetBool("HasGun",interactionHandler.GunEnabled); + print("carrying:" + interactionHandler.IsCarrying + " running:"+animController.GetBool(runningParameter)+" running speed:" + animController.GetFloat(runningSpeedParameter)); } } diff --git a/Assets/Scripts/Player/PlayerInteractionHandler.cs b/Assets/Scripts/Player/PlayerInteractionHandler.cs index 1b50c64..e66d5a7 100644 --- a/Assets/Scripts/Player/PlayerInteractionHandler.cs +++ b/Assets/Scripts/Player/PlayerInteractionHandler.cs @@ -68,9 +68,9 @@ public class PlayerInteractionHandler : MonoBehaviour // Update is called once per frame void Update() { - + if(Input.GetButtonDown("Fire1")) { if (this.GunEnabled)