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); }
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); }
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); }