public class TitlePluginGUI : MonoBehaviour
{
//DRETAX CODE
float deltaTime = 0.0f;
void Update()
{
deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
}
//FIN
public void OnGUI()
{
GUI.contentColor = Color.blue;
// GUI.Box(new Rect(5, 5, 275, 25), "RaidersLand 108.61.97.7:28016");
//DontWORK GUI.Box(new Rect(20, 20, 275, 25), World.GetWorld().Time.ToString());
//DRETAX CODE
int w = Screen.width, h = Screen.height;
GUIStyle style = new GUIStyle();
Rect rect = new Rect(0, 0, w, h * 2 / 100);
style.alignment = TextAnchor.UpperCenter;
style.fontSize = h * 2 / 100;
//style.normal.textColor = new Color (0.0f, 0.0f, 0.5f, 1.0f);
float msec = deltaTime * 1000.0f;
float fps = 1.0f / deltaTime;
//string text = string.Format("{0:0.0} ms ({1:0.} fps) ", msec, fps);
string text = string.Format("RaidersLand 108.61.97.7:28016 ({1:0.} fps) ", msec, fps);
GUI.Label(rect, text, style);
// FIN DRETAX CODE
}
}