Finished event control displaying and movement

This commit is contained in:
2020-02-01 11:44:43 -05:00
parent 9b23e5deff
commit 5b812bbb32
7 changed files with 47 additions and 23 deletions

View File

@@ -39,7 +39,7 @@ public class Player : MonoBehaviour
private void Jump()
{
// Jump
if (Input.GetKey(KeyCode.Space) && IsPlayerOnGround())
if (Input.GetKeyDown(KeyCode.Space) && IsPlayerOnGround())
{
rigidBody.velocity += new Vector2(0, jumpSpeed);
rigidBody.velocity = new Vector2(rigidBody.velocity.x,