Esempio n. 1
0
        public void ListLandscape()
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            Stellarium.GET(Path, "listlandscape", parameters, (result, error) => {
                if (error != null)
                {
                    Debug.LogError(string.Format("[{0}] {1}", Identifier, error)); return;
                }
                LandscapeList landscapeList = new LandscapeList();
                landscapeList.landscapes    = new Landscape();
                foreach (KeyValuePair <string, string> landscape in (new JSONObject(result).ToDictionary()))
                {
                    landscapeList.landscapes.Add(landscape.Key, landscape.Value);
                }
                if (OnGotLandscapeList != null)
                {
                    OnGotLandscapeList(landscapeList);
                }
            });
        }
Esempio n. 2
0
 private void ViewService_OnGotLandscapeList(LandscapeList result)
 {
     Debug.Log(result.landscapes.Count);
 }