Advertisement
Guest User

Untitled

a guest
Mar 20th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class ShowHunger : MonoBehaviour
  5. {
  6. static public float hunger;
  7. Text text;
  8.  
  9. void Awake()
  10. {
  11. text = GetComponent<text>();
  12. Hunger = 100f;
  13. }
  14.  
  15. void OnGUI () {
  16. text.text = "Hunger: " + hunger;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement