From 36e5300300b84519ddffdf0cbb0d37de78d69f1c Mon Sep 17 00:00:00 2001 From: allylikesfrogs Date: Tue, 2 May 2023 22:04:18 -0700 Subject: [PATCH] periodic update for my own sanity --- Assets/PlayerControls.inputactions | 20 ++++++++++++++++++++ Assets/Scripts/PlayerBehavior.cs | 15 +++++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/Assets/PlayerControls.inputactions b/Assets/PlayerControls.inputactions index e53bcec..504646a 100644 --- a/Assets/PlayerControls.inputactions +++ b/Assets/PlayerControls.inputactions @@ -40,6 +40,15 @@ "processors": "", "interactions": "", "initialStateCheck": false + }, + { + "name": "ClarinetDive", + "type": "Button", + "id": "559aad1e-5ce8-4aa1-9442-12f6f51fceca", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -196,6 +205,17 @@ "action": "Jump", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "679f7163-1cdf-4ae4-b4f4-133d1b2514a6", + "path": "/#(J)", + "interactions": "", + "processors": "", + "groups": "", + "action": "ClarinetDive", + "isComposite": false, + "isPartOfComposite": false } ] }, diff --git a/Assets/Scripts/PlayerBehavior.cs b/Assets/Scripts/PlayerBehavior.cs index 8dbfb46..90d02fc 100644 --- a/Assets/Scripts/PlayerBehavior.cs +++ b/Assets/Scripts/PlayerBehavior.cs @@ -90,9 +90,10 @@ public class PlayerBehavior : MonoBehaviour unlockedClarinet = stateController.unlockedClarinet; if(playerIsAlive) { - // if key pressed J - // launch down at 45 degree angle - // use: player facing, velocity, start/end points? + if (playerInput.actions["ClarinetDive"].WasPressedThisFrame()) + { + UseClarinet(); + } } } @@ -141,7 +142,13 @@ public class PlayerBehavior : MonoBehaviour void UseClarinet() { - + // if key pressed J + // launch down at 45 degree angle + // use: player facing, velocity, start dash function, end dash function + if (!playerController.IsGrounded()) + { + // + } } void ThrowTambourine() {