From 46f7cfe07ec67ae23f64ad29e2fc6f92c638824f Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 30 Apr 2023 23:53:52 -0700 Subject: [PATCH] fixed: player jittering and death sliding --- Assets/Prefabs/Player.prefab | 3 +- Assets/Scenes/GrenouilleVillage.unity | 107 +------------------------- Assets/Scenes/MainMenu.unity | 2 +- Assets/Scripts/DebugSceneSwitcher.cs | 2 +- Assets/Scripts/PlayerController.cs | 2 + 5 files changed, 9 insertions(+), 107 deletions(-) diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index 42bb903..75fd8a8 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -246,7 +246,7 @@ Rigidbody2D: m_ExcludeLayers: serializedVersion: 2 m_Bits: 0 - m_Interpolate: 0 + m_Interpolate: 1 m_SleepingMode: 1 m_CollisionDetection: 1 m_Constraints: 4 @@ -368,6 +368,7 @@ MonoBehaviour: grapplingRope: {fileID: 7648135587659148198} playerController: {fileID: 5559747613460074786} stateController: {fileID: 0} + playerIsAlive: 1 --- !u!114 &5559747613460074786 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/GrenouilleVillage.unity b/Assets/Scenes/GrenouilleVillage.unity index f31e639..756d8c6 100644 --- a/Assets/Scenes/GrenouilleVillage.unity +++ b/Assets/Scenes/GrenouilleVillage.unity @@ -8703,18 +8703,6 @@ PrefabInstance: propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - - target: {fileID: 5885597207104481986, guid: 576d3fc87874f426294e4bbacb171478, type: 3} - propertyPath: m_LocalScale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5885597207104481986, guid: 576d3fc87874f426294e4bbacb171478, type: 3} - propertyPath: m_LocalScale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5885597207104481986, guid: 576d3fc87874f426294e4bbacb171478, type: 3} - propertyPath: m_LocalScale.z - value: 0.5 - objectReference: {fileID: 0} - target: {fileID: 5885597207104481986, guid: 576d3fc87874f426294e4bbacb171478, type: 3} propertyPath: m_LocalPosition.x value: -13.494928 @@ -15226,7 +15214,7 @@ GameObject: - component: {fileID: 744413583} - component: {fileID: 744413584} m_Layer: 0 - m_Name: Door + m_Name: Door_Victory m_TagString: Door m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -15294,7 +15282,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a22e1f323783642f398cdf2ed3adcafa, type: 3} m_Name: m_EditorClassIdentifier: - height: 1 + height: 0.1 speed: 1 --- !u!1001 &750503772 PrefabInstance: @@ -16995,95 +16983,6 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 9230d7cbf1bbf0046a4d642090b875f3, type: 3} ---- !u!1001 &820021645 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 902593536366452992, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_Name - value: VictoryObject - objectReference: {fileID: 0} - - target: {fileID: 2405279164506414502, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_SpriteTilingProperty.oldSize.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2405279164506414502, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_SpriteTilingProperty.oldSize.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4922823812539002641, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalScale.x - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 4922823812539002641, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalScale.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 4922823812539002641, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalScale.z - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 4922823812539002641, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_ConstrainProportionsScale - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7451084690627063635, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 21300000, guid: b5f64a07787ea48ad8d00b3ec2d138e4, type: 3} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_RootOrder - value: 15 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalPosition.x - value: 91.11 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalPosition.y - value: 0.07 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7938030115108489908, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: fff4dbc75abf546fe8c72b078d034f73, type: 3} --- !u!1 &820050763 GameObject: m_ObjectHideFlags: 0 @@ -24734,7 +24633,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1206589089063141587, guid: ecbe9d625a3954206bc8d3d6361ad9b2, type: 3} propertyPath: m_RootOrder - value: 16 + value: 15 objectReference: {fileID: 0} - target: {fileID: 1206589089063141587, guid: ecbe9d625a3954206bc8d3d6361ad9b2, type: 3} propertyPath: m_LocalScale.x diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity index 0c61743..9c5c57b 100644 --- a/Assets/Scenes/MainMenu.unity +++ b/Assets/Scenes/MainMenu.unity @@ -1080,7 +1080,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 4111321198473826588, guid: d6205339b553a488587c95750260d944, type: 3} propertyPath: inDebugMode - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 5026779833035567294, guid: d6205339b553a488587c95750260d944, type: 3} propertyPath: m_RootOrder diff --git a/Assets/Scripts/DebugSceneSwitcher.cs b/Assets/Scripts/DebugSceneSwitcher.cs index 59625c0..579b903 100644 --- a/Assets/Scripts/DebugSceneSwitcher.cs +++ b/Assets/Scripts/DebugSceneSwitcher.cs @@ -7,7 +7,7 @@ using TMPro; public class DebugSceneSwitcher : MonoBehaviour { - void Start() { + void Awake() { if (!GameObject.Find("StateController").GetComponent().inDebugMode) { Destroy(this.gameObject); } diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index 21eaeb4..2873a79 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -80,6 +80,8 @@ public class PlayerMovement : MonoBehaviour { if (playerBehavior.playerIsAlive) { this._moveInput = value.Get(); + } else { + this._moveInput = Vector2.zero; } }