StatsLine.cs 697 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class StatsLine : MonoBehaviour
  6. {
  7. public Text statName;
  8. public Text statValue;
  9. public void SetStatName(string value) {
  10. statName.text = value;
  11. }
  12. public void SetStatValue(string value) {
  13. statValue.text = value;
  14. }
  15. public string GetValue() {
  16. return statValue.text;
  17. }
  18. public void MakeBold() {
  19. statName.fontStyle = FontStyle.Bold;
  20. statValue.fontStyle = FontStyle.Bold;
  21. }
  22. public void UnBold() {
  23. statName.fontStyle = FontStyle.Normal;
  24. statValue.fontStyle = FontStyle.Normal;
  25. }
  26. }