Hi,
So i am trying to create a 2D game in which my character only needs the ability to jump.
I am trying to accomplish this without using any of the Unity downloadable assets or addons.
I created a simple script (very simple) to make my player jump, however when i go to run the game i cant due to errors.
The errors are the 'Parsing error' and 'unexpected symbol '}'
However in my script i cannot find the issue? this is probably just because i am new to unity and C# scripting.
The script is below:
public class Jump : MonoBehaviour {
public float JumpSpeed = 100.0f;
void jump(){
Animation.Play ("Jump");
Rigidbody.AddForce (Vector3.up * JumpSpeed);
}
void Start () {
}
void Update () {
if(Input.GetButtonDown("jump")){
Jump()
}
}
}
Any help would be majorly appreciated, thx :)
↧