Saturday, 22 March 2014

HUD

public class HUD : MonoBehaviour
{
public static double CollectablePoints;
public static string PickUpTextTorch;
//public static int FlareCount;
public static int BatteryCount;
public static bool HasFlashlight;
//public static string PickUpTextFlare;
public static string PickUpTextCollectable1;
public static string PickUpTextCollectable2;
public static string PickUpTextCollectable3;
public static string PickUpTextCollectable4;
public static string PickUpTextCollectable5;
public static string PickUpTextCollectable6;
public static string PickUpTextCollectable7;
public static string PickUpTextBattery;


public void OnGUI()
{
if (HasFlashlight)
{
GUI.Label (new Rect (10, 10, 80, 30), "Flashlight");
GUI.Label (new Rect (70, 10, 80, 30), Flashlight.BatteryLife.ToString ("F2"));
}


GUI.Label (new Rect (10, 40, 80, 30), "Batteries");
GUI.Label (new Rect (70, 40, 80, 30), BatteryCount.ToString ());


//GUI.Label (new Rect (10, 55, 80, 30), "Flares");
//GUI.Label (new Rect (70, 55, 80, 30), FlareCount.ToString ());


GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextTorch.ToString ());

GUI.Label (new Rect (10, 65, 80, 30), "Points");
GUI.Label (new Rect (70, 65, 80, 30), CollectablePoints.ToString ());



GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextCollectable1.ToString ());

GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextCollectable2.ToString ());

GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextCollectable3.ToString ());

GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextCollectable4.ToString ());

GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextCollectable5.ToString ());

GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextCollectable6.ToString ());

GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextCollectable7.ToString ());

GUI.Label (new Rect (700, 1000, 200, 30), "");
GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextBattery.ToString ());

//GUI.Label (new Rect (700, 1000, 200, 30), "");
//GUI.Label (new Rect (700, 1000, 200, 30), PickUpTextFlare.ToString ());
}
}

No comments:

Post a Comment