Jump error

Hello, this is my first project in Unity and it was supposed to be a game but as soon as I started the game the character just flew away, here are the 2 scripts:

usando System.Collections;
usando System.Collections.Generic;
usando UnityEngine;

Personagem de classe pública: MonoBehaviour
{
flutuação pública Velocidade;
direção de flutuação privada;
equipamento Rigidbody2D privado;
flutuação pública JumpForce;

public bool isJumping;

privado Vector3 voltado para a direita;
privado Vector3 voltado para a esquerda;

void Início()
{
enfrentandoRight = transform.localScale;
faceLeft = transform.localScale;
faceEsquerda.x = faceEsquerda.x * -1;
equipamento = GetComponent();
}

void Atualizar()
{

Pular();
Jogada();
direção = Input.GetAxis(“Horizontal”);
se (direção > 0)
{
transform.localScale = voltado para a Direita;
}
if(direção < 0)
{
transform.localScale = voltado para a esquerda;
}

}
void Move()
{
Movimento do vetor3 = new Vetor3(Input.GetAxis(“Horizontal”), 0f, 0f);
transform.position += movimento * Time.deltaTime * Speed;
}
salto vazio()
{
if (Input.GetButtonDown(“Jump”) && !isJumping);
{
rig.AddForce(new Vector2(0f, JumpForce), ForceMode2D.Impulse);
}
}
}

and this:

usando System.Collections;
usando System.Collections.Generic;
usando UnityEngine;

classe pública Aterrada: MonoBehaviour
{

Jogador de personagem;

// Start é chamado antes da primeira atualização do quadro
void Início()
{
Jogador = gameObject.transform.parent.gameObject.GetComponent();
}

void OnCollisionEnter2D(colisor Collision2D)
{
if(collisor.gameObject.layer == 9)
{
Player.isJumping = false;
}
}

void OnCollisionExit2D(colisor Collision2D)
{
if (collisor.gameObject.layer == 9)
{
Player.isJumping = true;

}
}
}

Sorry for the google translate english.

You gotta at least state the following items.

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

This is the bare minimum of information to report:

  • what you want
  • what you tried
  • what you expected to happen
  • what actually happened, especially any errors you see
  • links to documentation you used to cross-check your work (CRITICAL!!!)

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: https://discussions.unity.com/t/481379