Hello All!
At the moment I am currently making a multiplayer game. There are two teams. One human team and one controlled by the paranormal. I hoped something like this would seperate the two GUIs but at the moment they both render over each other…
function OnGUI(){
if (teamnumber == 1)
{
GUI.Label(new Rect(10,10,250,50),"Current Objective: " + objective); //Prints Objective
GUI.Label(new Rect(10,30,200,50),"Sanity: " + sanity);
var iconID :int; //Checks battery charge
if(battery > 85) iconID = 0;
else if(battery > 75) iconID = 1;
else if(battery > 65) iconID = 2;
else if(battery > 50) iconID = 3;
else if(battery > 25) iconID = 4;
else if(battery > 0) iconID = 5;
else iconID = 6;
GUI.Label(new Rect(10,Screen.height-100,iconWidth,iconHeight),GUIContent(batteryIcons[iconID]));
}
else if (teamnumber == 2)
{
GUI.Label(new Rect(10,10,250,50),"Beast Test");
}
}
Any suggestions? I am at my wits end.