Finished event control displaying and movement

This commit is contained in:
Giovani
2020-02-01 11:44:43 -05:00
parent abdf8add9f
commit 89427f7a90
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,