Need Help how to add to inspector text edit, for this script RPG menssage.
to edit (“hello, the machine works?”); etc…
var showDialog : boolean = false;
var select : boolean = false;
function Update () {
}
function OnGUI()
{
GUILayout.BeginArea(new Rect(10,10,200,200));
if (showDialog !select)
{
Time.timeScale = 0;
GUILayout.Label("hello, the machine works?");
GUILayout.Label("This is working?");
if (GUILayout.Button("Yes, it works"))
{
select = true;
Time.timeScale = 1;
showDialog = false;
}
if (GUILayout.Button("No, dont work"))
{
Time.timeScale = 1;
showDialog = false;
}
}
if (showDialog select)
{
Time.timeScale = 0;
GUILayout.Label("Tks for the help.");
if (GUILayout.Button("ok"))
{
Time.timeScale = 1;
showDialog = false;
}
}
GUILayout.EndArea();
}
function OnTriggerEnter(hit : Collider)
{
showDialog = true;
}
function OnTriggerExit()
{
//showDialog = false;
}