ModelPlayer.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using XRTool.Util;
  5. namespace ShadowStudio.Model
  6. {
  7. /// <summary>
  8. /// 模型播放器
  9. /// </summary>
  10. public class ModelPlayer : ArtPlay
  11. {
  12. private ArtInfo info;
  13. public ArtInfo Info { get => info; set => info = value; }
  14. public virtual void AddToNode(Object obj)
  15. {
  16. var tmp = obj as GameObject;
  17. if (tmp)
  18. {
  19. //GameNode.Instance.SetParent(ObjNode.World, tmp.transform, Vector3.zero, Vector3.zero, Vector3.one, false);
  20. }
  21. }
  22. public virtual ArtContainer CreateContainer()
  23. {
  24. return ArtInfoMgr.Instance.CreateContainer(Info.ArtType);
  25. }
  26. public virtual bool IsNeedInstance()
  27. {
  28. return true;
  29. }
  30. public virtual bool IsNeedLoad()
  31. {
  32. return true;
  33. }
  34. public virtual void SetData(ArtInfo info, string containerName = "")
  35. {
  36. this.Info = info;
  37. }
  38. }
  39. }