Esempio n. 1
0
 public initMsg(List <GameObject> obs)
 {
     header = new header();
     header.build("INIT", "initializing world", 0);
     objects = new List <obj>();
     for (int i = 0; i < obs.Count; i++)
     {
         objects.Add(new obj(obs[i], i));
     }
 }
Esempio n. 2
0
    private void getNext()
    {
        //Debug.Log("getting next");
        header next = new header();

        next.build("NEXT", "Getting the next command", sent);
        string msg = "JSON{\"header\":" + JsonUtility.ToJson(next) + ",\"body\":{}}";

        w.SendString(msg);
        waiting = 0;
    }
Esempio n. 3
0
    private void stop()
    {
        header stopper = new header();

        stopper.build("STOP", "Stopping the server", sent);
        string msg = "JSON{\"header\":" + JsonUtility.ToJson(stopper) + ",\"body\":{}}";

        //Debug.Log(msg);
        w.SendString(msg);
        done = true;
    }