Okay so I basically started learning Unity last night, but my issue was that the tutorial that i was following was JavaScript, and I’m personally not a fan of it, anyway I’ve done my best to try and translate it as I know it’s not too hard of a thing to do, but I keep getting multiple issues each time, and when i fix that issue, I get another one…
using UnityEngine;
using System.Collections;
public class playerMove : MonoBehaviour {
public float player_Move = 7.5f;
public float playerLives = 3;
static int playerScore;
GameObject playerBullet = new GameObject(Rigidbody);
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Translate (Vector3.right * Input.GetAxis (“Horizontal”) * player_Move * Time.deltaTime);
if (Input.GetKeyDown(“Space”))
{
GameObject tempBullet = new Rigidbody();
tempBullet = Instantiate (playerBullet, transform.position, transform.rotation);
}
}
void OnGUI (){
GUI.Box (new Rect (10, 10, 100, 90), "Score: " + playerScore);
GUI.Box (new Rect (240, 10, 200, 90), "Lives: " + playerLives);
}
}