WorldDlgPlayer.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using XRTool.Util;
  5. namespace ShadowStudio.Model
  6. {
  7. /// <summary>
  8. /// World UI的播放器
  9. /// </summary>
  10. public class WorldDlgPlayer : ArtPlay
  11. {
  12. private ArtInfo info;
  13. public ArtInfo Info { get => info; set => info = value; }
  14. /// <summary>
  15. /// 添加到容器中
  16. /// </summary>
  17. /// <param name="obj"></param>
  18. public virtual void AddToNode(Object obj)
  19. {
  20. var tmp = obj as GameObject;
  21. if (tmp)
  22. {
  23. //GameNode.Instance.SetParent(ObjNode.WorldCanvas, tmp.transform, Vector3.zero, Vector3.zero, Vector3.one, false);
  24. }
  25. }
  26. public virtual ArtContainer CreateContainer()
  27. {
  28. return ArtInfoMgr.Instance.CreateContainer(ArtType.WorldDlg);
  29. }
  30. /// <summary>
  31. /// 图片无需实例化
  32. /// </summary>
  33. /// <returns></returns>
  34. public virtual bool IsNeedInstance()
  35. {
  36. return true;
  37. }
  38. /// <summary>
  39. /// 图片需要加载
  40. /// </summary>
  41. /// <returns></returns>
  42. public virtual bool IsNeedLoad()
  43. {
  44. return true;
  45. }
  46. public virtual void SetData(ArtInfo info, string containerName = "")
  47. {
  48. this.Info = info;
  49. }
  50. }
  51. }