// Load Screen Script
// Inspector Variables
var waitTime : float = 3.0;
//
function Update ()
{
if(Input.GetKeyDown("space"))
{
Application.LoadLevel("Level1");
}
else
{
Waittime();
}
}
function OnGUI ()
{
// Make a group @ center of screen
GUI.BeginGroup(Rect (Screen.width/2-100,Screen.height/2-100,200,200));
// make box to see the group on screen
GUI.Box(Rect(0,0,200,200),"Instructions");
//Instructions for player
GUI.Label(Rect(10,30,140,40),"Arrow Keys to Move");
GUI.Label(Rect(10,60,160,70),"Spacebar to Shoot");
GUI.Label(Rect(10,90,180,100),"E to create a temporary shield");
GUI.Label(Rect(10,120,200,100),"Esc to Quit the Game");
GUI.EndGroup();
}
function Waittime()
{
yield WaitForSeconds(waitTime);
Application.LoadLevel("Level1");
}
No comments:
Post a Comment