using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using LitJson; public class WebController { private static WebController _Instance; public static WebController Instance { get { if (WebController._Instance == null) WebController._Instance = new WebController(); return WebController._Instance; } } public void Login() { MainAccountData.code = MainAccountData.LocalCode; WebManager.GetInstance.Login(() => { //DownLoadController.GetInstance.DownUrl = GameDefine.CdnPath(MainAccountData.Instance.cdn_url); //WorldSceneManager.GetInstance.PreStart(false); }); } public void GetWorldInfo(Action action) { WebManager.GetInstance.HttpPostRequest_Send(PROTOCOLS.worldAreaBlock, null, (jsondata) => { if (action != null) action(jsondata); }, (jsdata) => { }); } public void ChangeScene() { var dic = new Dictionary() { {"ground_id", "1"},{"scene_id", "USC165805685261f3add03a283"},{"source","1"} }; WebManager.GetInstance.HttpPostRequest_Send(PROTOCOLS.worldSceneData, dic, (jsondata) => { //Debug.Log(",,,,,,,,"); //InDoorControoler.GetInstance.GoToInDoor //InDoorControoler.GetInstance.PreDoor("1", "USC165805685261f3add03a283", jsondata); }, (jsdata) => { }); } //"ground_id": "1", // "ground_scene_out": "USC112339683061f1072e2ba28", // 2 }