This has to be a bug… Unexpected symbol ‘}’ on lines 18 and 21.
using UnityEngine;
using System.Collections;
public class core : MonoBehaviour {
public static float healthC;
public Rigidbody rb;
public float speed;
void Start () {
healthC = 100;
}
void Update () {
if (healthC <= 0) {
Destroy(gameObject);
}
if (Input.GetKey (KeyCode.W){
rb.AddForce(Vector3.forward * speed * Time.deltaTime, ForceMode.Acceleration);
}
if (Input.GetKey (KeyCode.UpArrow){
transform.Rotate(Vector3.up * speed * Time.deltaTime, Space.World);
}
}
}