diff --git a/Game/Assets/Scripts/DropletMovement.cs b/Game/Assets/Scripts/DropletMovement.cs index 9326e5b..11baa7b 100644 --- a/Game/Assets/Scripts/DropletMovement.cs +++ b/Game/Assets/Scripts/DropletMovement.cs @@ -192,7 +192,18 @@ public class DropletMovement : MonoBehaviour isGrounded = false; } - + private void DropDown() + { + //when "s" or "down key" is pressed turn of/disable collider; + //move object slowly down (1 seconds, move down the height of the collision box) + //after that enable collider again + + if (isGrounded && (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow))) + { + StartCoroutine(DropRoutine()); + } + } + private IEnumerator DropRoutine() { Collider2D playerCollider = GetComponent();