Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

How do I fix this script?

$
0
0
var quit=false; function OnMouseEnter() { GetComponent.().material.color = Color.red; //Change Color to red! } function OnMouseExit() { GetComponent.().material.color = Color.white; //Change Color to white! } function OnMouseUp() { if (quit = true) { Application.Quit(); //If you click on quit aplication quits. } else { Application.LoadLevel("scene 1"); //If you click on other button it loads game! } } function Update() { if (Input.GetKey(KeyCode.Escape)) //If you press (escape) game force closes! { Application.Quit(); } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles