示例#1
0
    public void shutter()
    {
        socketCall call     = new socketCall("dropPlayer", "app", currentRoom, null, "CLU");
        string     jsonData = call.getCall();

        JSONObject js = new JSONObject(jsonData);

        socket.Emit("dropPlayer", js);
    }
示例#2
0
    //----------------------------------------THINGS TO SEND TO THE SOCKET-----------------------------------------------

    public void joinRoom(string roomCode)
    {
        Debug.Log("joinRoom + " + roomCode);
        string     values_JSON = @" ""roomCode"": """ + roomCode + @"""";
        socketCall call        = new socketCall("joinRoom", "server", roomCode, values_JSON);
        string     jsonData    = call.getCall();

        JSONObject js = new JSONObject(jsonData);

        socket.Emit("joinRoom", js);
    }
示例#3
0
    //Sends choices for all players who did not submit the current clue word [RESENDABLE]
    public void newTrack(int bpm, string playerWhoGaveClue, string title, string artist)
    {
        string values_JSON = @"     ""bpm"": """ + bpm + @""",
                                    ""title"": """ + title + @""",
                                    ""artist"": """ + artist + @"""
                              ";

        socketCall call     = new socketCall("sendChoices", "app", currentRoom, values_JSON, playerWhoGaveClue);
        string     jsonData = call.getCall();

        JSONObject js = new JSONObject(jsonData);

        socket.Emit("sendChoices", js);
    }