From 08e29b2e701f9ed57d8b0a898c24ea00f038e01c Mon Sep 17 00:00:00 2001 From: orsolya-st Date: Sat, 6 Jun 2026 00:14:04 +0200 Subject: [PATCH 1/5] script editing first push helper variables (player) --- Game/Assets/Scripts/DropletMovement.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Game/Assets/Scripts/DropletMovement.cs b/Game/Assets/Scripts/DropletMovement.cs index 76b61a6..87f0946 100644 --- a/Game/Assets/Scripts/DropletMovement.cs +++ b/Game/Assets/Scripts/DropletMovement.cs @@ -2,11 +2,17 @@ using UnityEngine; public class DropletMovement : MonoBehaviour { - - public float moveSpeed = 5f; - private Rigidbody2D rb; + public float moveSpeed = 5f; private Vector2 movement; + private Animator playerAnim; //for animation + private float xInput; + + //helper variables + private bool isGrounded; + [SerializeField] private float dashSpeed; + [SerializeField] private float dashDuration; + private float dashTime; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() From 46c7885cabf46ee61c779a5c37826a0ff989caa3 Mon Sep 17 00:00:00 2001 From: cemt1363 Date: Sat, 6 Jun 2026 00:32:10 +0200 Subject: [PATCH 2/5] trying to figure out how to jump --- Game/.vsconfig | 6 ++++++ Game/Assets/Scripts/DropletMovement.cs | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Game/.vsconfig diff --git a/Game/.vsconfig b/Game/.vsconfig new file mode 100644 index 0000000..f019fd0 --- /dev/null +++ b/Game/.vsconfig @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedGame" + ] +} diff --git a/Game/Assets/Scripts/DropletMovement.cs b/Game/Assets/Scripts/DropletMovement.cs index 76b61a6..a1a0a27 100644 --- a/Game/Assets/Scripts/DropletMovement.cs +++ b/Game/Assets/Scripts/DropletMovement.cs @@ -2,11 +2,26 @@ using UnityEngine; public class DropletMovement : MonoBehaviour { +<<<<<<< Updated upstream public float moveSpeed = 5f; private Rigidbody2D rb; private Vector2 movement; +======= + private Rigidbody2D rb; + public float moveSpeed = 5f; + public float jumpingPower = 5f; + private Vector2 movement; + private Animator playerAnim; //for animation + private float xInput; + + //helper variables + private bool isGrounded = true; + [SerializeField] private float dashSpeed; + [SerializeField] private float dashDuration; + private float dashTime; +>>>>>>> Stashed changes // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() @@ -19,10 +34,15 @@ public class DropletMovement : MonoBehaviour { movement.x = Input.GetAxisRaw("Horizontal"); movement.y = Input.GetAxisRaw("Vertical"); + if (isGrounded && Input.GetKeyDown(KeyCode.Space)) + { + rb.AddForce(Vector2.up * jumpingPower, ForceMode2D.Impulse); + } } private void FixedUpdate() { rb.linearVelocity = movement.normalized * moveSpeed; } + } From 1c6c3bd110ae98cd692689dd4adc0a7d01cef95d Mon Sep 17 00:00:00 2001 From: cemt1363 Date: Sat, 6 Jun 2026 00:36:37 +0200 Subject: [PATCH 3/5] jump merge conflict idk --- Game/Assets/Scripts/DropletMovement.cs | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/Game/Assets/Scripts/DropletMovement.cs b/Game/Assets/Scripts/DropletMovement.cs index a1a0a27..477e3e6 100644 --- a/Game/Assets/Scripts/DropletMovement.cs +++ b/Game/Assets/Scripts/DropletMovement.cs @@ -2,47 +2,39 @@ using UnityEngine; public class DropletMovement : MonoBehaviour { -<<<<<<< Updated upstream - - public float moveSpeed = 5f; - - private Rigidbody2D rb; - private Vector2 movement; -======= private Rigidbody2D rb; + public float moveSpeed = 5f; public float jumpingPower = 5f; + private Vector2 movement; - private Animator playerAnim; //for animation + + private Animator playerAnim; private float xInput; - //helper variables private bool isGrounded = true; + [SerializeField] private float dashSpeed; [SerializeField] private float dashDuration; private float dashTime; ->>>>>>> Stashed changes - // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { rb = GetComponent(); } - // Update is called once per frame void Update() { movement.x = Input.GetAxisRaw("Horizontal"); - movement.y = Input.GetAxisRaw("Vertical"); + if (isGrounded && Input.GetKeyDown(KeyCode.Space)) { - rb.AddForce(Vector2.up * jumpingPower, ForceMode2D.Impulse); + rb.linearVelocity = new Vector2(rb.linearVelocity.x, jumpingPower); } } private void FixedUpdate() { - rb.linearVelocity = movement.normalized * moveSpeed; + rb.linearVelocity = new Vector2(movement.x * moveSpeed, rb.linearVelocity.y); } - -} +} \ No newline at end of file From 3a4d5de03a34dbe5cc5df18f6864fd34dd708c96 Mon Sep 17 00:00:00 2001 From: cemt1363 Date: Sat, 6 Jun 2026 00:41:23 +0200 Subject: [PATCH 4/5] current correct code inshallah --- Game/Assets/Scripts/DropletMovement.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Game/Assets/Scripts/DropletMovement.cs b/Game/Assets/Scripts/DropletMovement.cs index ca5702e..b070682 100644 --- a/Game/Assets/Scripts/DropletMovement.cs +++ b/Game/Assets/Scripts/DropletMovement.cs @@ -4,6 +4,7 @@ public class DropletMovement : MonoBehaviour { private Rigidbody2D rb; public float moveSpeed = 5f; + public float jumpingPower = 5f; private Vector2 movement; private Animator playerAnim; //for animation private float xInput; @@ -14,15 +15,6 @@ public class DropletMovement : MonoBehaviour [SerializeField] private float dashDuration; private float dashTime; - private Animator playerAnim; - private float xInput; - - private bool isGrounded = true; - - [SerializeField] private float dashSpeed; - [SerializeField] private float dashDuration; - private float dashTime; - void Start() { rb = GetComponent(); From 5c49f2b34b6377ad8177c6d806fce916c86ac815 Mon Sep 17 00:00:00 2001 From: cemt1363 Date: Sat, 6 Jun 2026 00:49:10 +0200 Subject: [PATCH 5/5] baby is coming --- Game/Assets/Scenes/cems scene.unity | 6 +++--- Game/Assets/Scripts/DropletMovement.cs | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Game/Assets/Scenes/cems scene.unity b/Game/Assets/Scenes/cems scene.unity index 5dc4bab..f47f316 100644 --- a/Game/Assets/Scenes/cems scene.unity +++ b/Game/Assets/Scenes/cems scene.unity @@ -137,7 +137,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4266476263824402640, guid: d56297e435f8410a584581d73d99d2e4, type: 3} propertyPath: m_GravityScale - value: 10 + value: 5 objectReference: {fileID: 0} - target: {fileID: 6566899495513628888, guid: d56297e435f8410a584581d73d99d2e4, type: 3} propertyPath: m_LocalPosition.x @@ -202,11 +202,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3} propertyPath: m_LocalPosition.x - value: -6.02 + value: -3.39 objectReference: {fileID: 0} - target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3} propertyPath: m_LocalPosition.y - value: -0.82 + value: -1 objectReference: {fileID: 0} - target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3} propertyPath: m_LocalPosition.z diff --git a/Game/Assets/Scripts/DropletMovement.cs b/Game/Assets/Scripts/DropletMovement.cs index b070682..9c47c33 100644 --- a/Game/Assets/Scripts/DropletMovement.cs +++ b/Game/Assets/Scripts/DropletMovement.cs @@ -10,7 +10,7 @@ public class DropletMovement : MonoBehaviour private float xInput; //helper variables - private bool isGrounded; + private bool isGrounded = true; [SerializeField] private float dashSpeed; [SerializeField] private float dashDuration; private float dashTime; @@ -24,6 +24,8 @@ public class DropletMovement : MonoBehaviour { movement.x = Input.GetAxisRaw("Horizontal"); + + if (isGrounded && Input.GetKeyDown(KeyCode.Space)) { rb.linearVelocity = new Vector2(rb.linearVelocity.x, jumpingPower);