Hello, I need help (I'm a beginner) I'm having some problems with my scripts ... several errors are showing up and I do not know how to solve !!
the errors are:
Assets/DENOVO SCRIPTS/again 3x.cs(5,14): error CS0101: The namespace `global::' already contains a definition for `NewBehaviourScript'
Assets/DENOVO SCRIPTS/again 3x.cs(23,6): warning CS0642: Possible mistaken empty statement
my script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public float forcaPulo;
void Start ()
{
}
void Update ()
{
Rigidbody2D Rigidbody = GetComponent ();
float movimento = Input.GetAxis("Horizontal");
Rigidbody.velocity = new Vector2 (movimento, Rigidbody ().velocity.y);
if (Input.GetKeyDown (KeyCode.Space));
{
Rigidbody.AddForce (new Vector2 (0, forcaPulo));
}
}
}
help me please ,_,
↧