AnimationText.cs 468 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.EventSystems;
  4. using UnityEngine.UI;
  5. namespace TriLib.Samples
  6. {
  7. public class AnimationText : MonoBehaviour, ISelectHandler, IEventSystemHandler
  8. {
  9. public string Text
  10. {
  11. get
  12. {
  13. return base.GetComponent<Text>().text;
  14. }
  15. set
  16. {
  17. base.GetComponent<Text>().text = value;
  18. }
  19. }
  20. public void OnSelect(BaseEventData eventData)
  21. {
  22. AssetLoaderWindow.Instance.HandleEvent(this.Text);
  23. }
  24. }
  25. }