123456789101112131415161718192021222324252627282930313233343536 |
- using LitJson;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class HttpGetValue : MonoBehaviour
- {
-
- void Start()
- {
- HttpTool.Instance.Get("https://fat1.qulivr.com/mr-navigator/v1/", "", (string getInterval) => {
- Debug.Log(getInterval);
- if (getInterval == null)
- Debug.LogError(" HttpTool Get Interval Error!!! ");
- JsonData data = JsonMapper.ToObject(getInterval);
- Debug.Log(data["code"]);
- if ((int)data["code"] == 200)
- {
- float z = float.Parse(data["defaultLoginZaxis"].ToString());
- float y = float.Parse(data["defaultLoginHeight"].ToString());
- Debug.Log(z);
- transform.position += new Vector3(0, y, z);
- }
- else
- Debug.LogError(" HttpTool Get Interval Error!!! ");
- });
- }
-
- void Update()
- {
-
- }
- }
|