PopMsg.cs 615 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class PopMsg : PopBase
  5. {
  6. [SerializeField]
  7. private Game3DButton OkBtn;
  8. [SerializeField]
  9. private TextMesh MText;
  10. protected override void Start()
  11. {
  12. OkBtn.onClick.AddListener(OnClick);
  13. }
  14. //框体类型
  15. public override PopType MType { get { return PopType.Msg; } }
  16. public override void Show(System.Object data)
  17. {
  18. this.MText.text = data as string;
  19. base.Show();
  20. }
  21. private void OnClick()
  22. {
  23. this.Hide();
  24. }
  25. }