YearBtn.cs 674 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class YearBtn : MonoBehaviour
  6. {
  7. public bool defaultActive = false;
  8. public Text normalDig;
  9. public Text activeDig;
  10. public Text yearSign;
  11. public float heightY;
  12. // Start is called before the first frame update
  13. void Start()
  14. {
  15. OnActive(defaultActive);
  16. }
  17. public void OnActive(bool active) {
  18. normalDig.gameObject.SetActive(!active);
  19. activeDig.gameObject.SetActive(active);
  20. yearSign.gameObject.SetActive(active);
  21. }
  22. // Update is called once per frame
  23. void Update()
  24. {
  25. }
  26. }