UserSceneItem.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using LitJson;
  2. using Newtonsoft.Json;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. public class UserSceneItem
  7. {
  8. //场景的扫描图
  9. public VufroiaTrigger vufroiaTrigger;
  10. //场景ID
  11. public string id;
  12. //场景名字
  13. public string name;
  14. //场景中的景点
  15. public Dictionary<string, SpotsItem> SpotsList = new Dictionary<string, SpotsItem>();
  16. GameObject _sceneModel;
  17. public GameObject SceneModel
  18. {
  19. get
  20. {
  21. if (_sceneModel == null)
  22. {
  23. _sceneModel = new GameObject(name);
  24. _sceneModel.transform.parent = null;//GameScene.Instance.transform;
  25. _sceneModel.transform.localPosition = Vector3.zero;
  26. _sceneModel.transform.localEulerAngles = Vector3.zero;
  27. }
  28. return _sceneModel;
  29. }
  30. }
  31. public void load()
  32. {
  33. Debug.Log("DGJ load ====> ");
  34. vufroiaTrigger.init();
  35. foreach (var v in SpotsList.Values)
  36. {
  37. v.VuforiaItem.SetActive(false);
  38. // v.show();
  39. }
  40. }
  41. public void Clear()
  42. {
  43. Debug.Log("Clear SpotsList");
  44. foreach (var v in SpotsList.Values)
  45. {
  46. v.Clear();
  47. // v.show();
  48. }
  49. // SpotsList.Clear();
  50. vufroiaTrigger.Clear();
  51. }
  52. //场景原始信息
  53. public string info;
  54. public string sentiment;
  55. public string updateTime;
  56. public string navLines;
  57. public string status;
  58. public string describe;
  59. public string image;
  60. public string map;
  61. public string sandTable;
  62. public string vuforiaXML;
  63. public string vuforiaDat;
  64. }