UserManager.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Newtonsoft.Json.Linq;
  2. using SC.XR.Unity;
  3. using UnityEngine;
  4. public class UserManager : SingletonMono<UserManager>
  5. {
  6. public void loginBack(bool isLogin)
  7. {
  8. if (isLogin)
  9. {
  10. UserSceneManager.Instance.callback += (bool b) => {
  11. //³õʼ»¯³¡¾°½áÊø
  12. if(b)
  13. {
  14. GameScene.Instance.ShowScenes();
  15. }
  16. };
  17. HttpTool.Instance.GetAllMaterials(HttpAction.material_init, "", (string msgMater)=> {
  18. Debug.Log("/material/init===>" + msgMater);
  19. ModelManager.Instance.init(msgMater);
  20. HttpTool.Instance.Get(HttpAction.project_init, (string msg) => {
  21. Debug.Log("/project/index===>" + msg);
  22. UserSceneManager.Instance.initScene(msg);
  23. // GameScene.Instance.ShowScenes();
  24. });
  25. });
  26. /*
  27. HttpTool.Instance.Get(HttpAction.viewpoint_init, (string msg) => {
  28. Debug.Log("/project/viewpoint_init===>" + msg);
  29. });*/
  30. }
  31. }
  32. }