YangShiItem.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class YangShiItem : MonoBehaviour
  5. {
  6. public GameObject video;
  7. public GameObject img;
  8. public GameObject model;
  9. public GameObject useObj;
  10. public GameObject showvideo()
  11. {
  12. useObj = video;
  13. video.gameObject.SetActive(true);
  14. img.gameObject.SetActive(false);
  15. model.gameObject.SetActive(false);
  16. return video;
  17. }
  18. public GameObject showimg()
  19. {
  20. useObj = img;
  21. video.gameObject.SetActive(false);
  22. img.gameObject.SetActive(true);
  23. model.gameObject.SetActive(false);
  24. return img;
  25. }
  26. public GameObject showmodel()
  27. {
  28. useObj = model;
  29. video.gameObject.SetActive(false);
  30. img.gameObject.SetActive(false);
  31. model.gameObject.SetActive(true);
  32. return model;
  33. }
  34. public void Close()
  35. {
  36. useObj = null;
  37. video.gameObject.SetActive(false);
  38. img.gameObject.SetActive(false);
  39. model.gameObject.SetActive(false);
  40. }
  41. }