using UnityEngine;
using System.Collections;
public class player_controler : MonoBehaviour {
public float moveSpeed;
public float jumpHeight;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown) (KeyCode.Space))
{
rigidbody2d.velocity = new vector2(0,jumpHeight;)
}
}
}
This is what shows up:
Assets/scripts/player_controler.cs(16,53): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement