Exemplo n.º 1
0
    public void clickButton()
    {
        JsonFloat jd = new JsonFloat();

        jd.status = "shoot";
        JSONObject jo = new JSONObject(JsonUtility.ToJson(jd));

        // Debug.Log("id = " + id );
        // jo.AddField("idx", id );
        // Debug.Log(jo);

        socket.Emit("send", jo);
    }
Exemplo n.º 2
0
    public void SendStop()
    {
        // Debug.Log("idxList = " + idxlist[0]);
        //JSONObject jo = new JSONObject();
        JsonFloat jd = new JsonFloat();

        jd.status = "stop";
        JSONObject jo = new JSONObject(JsonUtility.ToJson(jd));

        // Debug.Log("id = " + id );
        // jo.AddField("idx", id );
        // Debug.Log(jo);

        socket.Emit("send", jo);
    }
Exemplo n.º 3
0
    public void SendJson(float x, float y, float z)
    {
        // Debug.Log("idxList = " + idxlist[0]);
        //JSONObject jo = new JSONObject();
        JsonFloat jd = new JsonFloat();

        jd.x      = x;
        jd.y      = y;
        jd.z      = z;
        jd.status = "update";
        JSONObject jo = new JSONObject(JsonUtility.ToJson(jd));

        // Debug.Log("id = " + id );
        // jo.AddField("idx", id );
        // Debug.Log(jo);

        socket.Emit("send", jo);
    }