LangChaoMailManager.cs 868 B

123456789101112131415161718192021222324252627282930313233343536
  1. using LitJson;
  2. using Newtonsoft.Json.Linq;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. public class LangChaoMailManager : MonoSingleton<LangChaoMailManager>
  7. {
  8. public Transform Mail_ImageList;
  9. public Transform showImagePoint;
  10. public GameObject mail_imageItem;
  11. // 显示邮件
  12. // 加载邮件图片
  13. // 接受邮件
  14. public void ReceiverMail(JObject data)
  15. {
  16. // 邮件分类
  17. // 加载显示邮件
  18. if (data["image_data"] != null)
  19. {
  20. GameObject obj = GameObject.Instantiate(mail_imageItem, Mail_ImageList);
  21. obj.transform.position = showImagePoint.position;
  22. obj.transform.eulerAngles = showImagePoint.eulerAngles;
  23. obj.SetActive(true);
  24. obj.GetComponent<Mail_ImageItem>().SetImageData(data["image_data"].ToString());
  25. }
  26. }
  27. }