Inheritance: MonoBehaviour
Esempio n. 1
0
 private void Start_Button_Click(object sender, EventArgs e)
 {
     Start1.Show();
     NameLabel.Show();
     UsernameInput.Show();
     Start_Button.Hide();
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Start1 start = new Start1();

            start.GetStart();
            Console.ReadKey();
        }
Esempio n. 3
0
 public Form1()
 {
     InitializeComponent();
     Start1.Hide();
     NameLabel.Hide();
     UsernameInput.Hide();
 }
Esempio n. 4
0
        // Start is called before the first frame update
        void Start()
        {
            Debug.Log("Game started");

            string json          = File.ReadAllText(Application.dataPath + "/dataTest.json");
            Start1 locationData  = JsonUtility.FromJson <Start1>("{\"data\":" + json + "}");
            Start2 locationData1 = JsonUtility.FromJson <Start2>("{\"data\":" + json + "}");



            /*
             * string test = JsonUtility.ToJson(locationData);
             * Debug.Log(test);
             * string test1 = JsonUtility.ToJson(locationData1);
             * Debug.Log(test1);
             *
             * LocationData1 locationData1 = JsonUtility.FromJson<LocationData1>(json);
             *
             *
             *
             * Debug.Log("ts: " + locationData.ts);
             * Debug.Log("valid: " + locationData.dist.status);
             * Debug.Log("id: " + locationData.dist.content.id);
             * Debug.Log("id2: " + str1);
             * Debug.Log("id2: " + str2);
             * Debug.Log("distance: " + locationData1.dist.content.resources[2].value);
             */


            //for each data location
            for (var k = 0; k < locationData.data.Length; k++)
            {
                string str1 = "";
                string str2 = "";
                for (var i = 0; i < 16; i++)
                {
                    str1 += locationData.data[k].dist.content.resources[0].value[i];
                    str2 += locationData.data[k].dist.content.resources[1].value[i];
                }

                /*
                 * time = locationData.data[k].ts
                 *  id1 = str1
                 *  id2 = str2
                 *  distance = locationData1.data[k].dist.content.resources[2].value
                 *
                 */

                string answer = "time: " + locationData.data[k].ts + "\n"
                                + "id1: " + str1 + "\n"
                                + "id2: " + str2 + "\n"
                                + "distance: " + locationData1.data[k].dist.content.resources[2].value;
                Debug.Log(answer);
            }
        }