iTz_WyTe

PlayerStats

Mar 23rd, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System.Collections;
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4.  
  5. public class PlayerStats : MonoBehaviour {
  6.  
  7. public string playerElement;
  8. public static int playerEssence;
  9. public static int playerLives;
  10. public int startPlayerEssence;
  11. public int startPlayerLives;
  12.  
  13. public Text essenceText;
  14. public Text livesText;
  15.  
  16. void Start () {
  17. playerEssence = startPlayerEssence;
  18. playerLives = startPlayerLives;
  19. }
  20.  
  21. void Update () {
  22. essenceText.text = "Essence: " + playerEssence;
  23. livesText.text = "Lives " + playerLives;
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment