var playerSpeed : int;
var playerLives : int;
static var playerScore : int;
var bullet : Rigidbody;
function Update () {
amtToMove = (playerSpeed * Input.GetAxis("Horizontal")) * Time.deltaTime;
transform.Translate(Vector3.right * amtToMove);
if( Input.GetKeyDown("space")){
var tempBullet : Rigidbody;
tempBullet = Instantiate(bullet,transform.position,transform.rotation);
}
function OnGUI(){
GUI.Label(Rect(10,10,200,50),"Score:" + playerScore);
GUI.Label(Rect(10,30,200,50),"Lives:" + playerLives);
}
please help I am completely lost and have tried doing everything it says
please be aware I am very new to scripting and unity and don’t know a lot!