123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using XRTool.Util;
- namespace ShadowStudio.Model
- {
- /// <summary>
- /// World UI的播放器
- /// </summary>
- public class WorldDlgPlayer : ArtPlay
- {
- private ArtInfo info;
- public ArtInfo Info { get => info; set => info = value; }
- /// <summary>
- /// 添加到容器中
- /// </summary>
- /// <param name="obj"></param>
- public virtual void AddToNode(Object obj)
- {
- var tmp = obj as GameObject;
- if (tmp)
- {
- GameNode.Instance.SetParent(ObjNode.WorldCanvas, tmp.transform, Vector3.zero, Vector3.zero, Vector3.one, false);
- }
- }
- public virtual ArtContainer CreateContainer()
- {
- return ArtInfoMgr.Instance.CreateContainer(ArtType.WorldDlg);
- }
- /// <summary>
- /// 图片无需实例化
- /// </summary>
- /// <returns></returns>
- public virtual bool IsNeedInstance()
- {
- return true;
- }
- /// <summary>
- /// 图片需要加载
- /// </summary>
- /// <returns></returns>
- public virtual bool IsNeedLoad()
- {
- return true;
- }
- public virtual void SetData(ArtInfo info, string containerName = "")
- {
- this.Info = info;
- }
- }
- }
|