StatsLine.cs 764 B

12345678910111213141516171819202122232425262728293031323334353637
  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 GetName() {
  16. return statName.text;
  17. }
  18. public string GetValue() {
  19. return statValue.text;
  20. }
  21. public void MakeBold() {
  22. statName.fontStyle = FontStyle.Bold;
  23. statValue.fontStyle = FontStyle.Bold;
  24. }
  25. public void UnBold() {
  26. statName.fontStyle = FontStyle.Normal;
  27. statValue.fontStyle = FontStyle.Normal;
  28. }
  29. }