From b00ebe7558a84b5af9019ed4b825d454ece7e718 Mon Sep 17 00:00:00 2001 From: LD Date: Thu, 20 Oct 2022 08:37:53 -0400 Subject: [PATCH] Changed one of the comments so it explains usage better --- .gitignore | 4 ++++ Assets/PlayerMovement.cs | 6 ++++++ ProjectSettings/ShaderGraphSettings.asset | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 ProjectSettings/ShaderGraphSettings.asset diff --git a/.gitignore b/.gitignore index 7a5cd83..c66c989 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,9 @@ # Visual Studio cache directory .vs/ +# Visual Studio SLN config +*.VSCONFIG + # Gradle cache directory .gradle/ @@ -47,6 +50,7 @@ ExportedObj/ *.opendb *.VC.db + # Unity3D generated meta files *.pidb.meta *.pdb.meta diff --git a/Assets/PlayerMovement.cs b/Assets/PlayerMovement.cs index e2dda9e..a1a9570 100644 --- a/Assets/PlayerMovement.cs +++ b/Assets/PlayerMovement.cs @@ -86,6 +86,12 @@ void Update() #region bool control doJump |= (jumpAction.GetButtonDown() && jumpCount > 0 && !jumping); //We use |= because we want doJump to be set from true to false + //This ^ Operator is the or equals operator, it's kind of hard to explain so hopefully I explain this correctly, + //Basically its saying this : doJump = doJump || (jumpAction.GetButtonDown() && jumpCount > 0 && !jumping) + //Which is too say, if doJump is already true we return true otherwise we check (jumpAction.GetButtonDown() && jumpCount > 0 && !jumping) + //The reason we do this is because the only time we want doJump = false is when we directly set it later in the code after we + //call the jump function. So unless we are setting doJump to false it will be able to return true and only check our conditional + //again once it is set to false. //in the event that doJump is already false and our conditional returns true; if (isGrounded) { diff --git a/ProjectSettings/ShaderGraphSettings.asset b/ProjectSettings/ShaderGraphSettings.asset new file mode 100644 index 0000000..9b28428 --- /dev/null +++ b/ProjectSettings/ShaderGraphSettings.asset @@ -0,0 +1,16 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3} + m_Name: + m_EditorClassIdentifier: + customInterpolatorErrorThreshold: 32 + customInterpolatorWarningThreshold: 16