Got updated Scripts from main
This commit is contained in:
@@ -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<Collider2D>();
|
||||
|
||||
Reference in New Issue
Block a user