Exemple #1
0
    private void ConnectToServer(SocketIOEvent evt = null)
    {
        Dictionary <string, string> data = new Dictionary <string, string>();

        data["name"] = SystemInfo.deviceUniqueIdentifier;
        data["role"] = "s";
        Vector3 position = Vector3.zero;

        data["position"] = position.x + "," + position.y + "," + position.z;
        socket.Emit("JOIN", new JSONObject(data));
    }
Exemple #2
0
    private void ConnectToServer(SocketIOEvent evt)
    {
        Dictionary <string, string> data = new Dictionary <string, string>();

        data["name"] = "teacher";
        data["role"] = "t";
        Vector3 position = Vector3.zero;

        data["position"] = position.x + "," + position.y + "," + position.z;
        socket.Emit("JOIN", new JSONObject(data));
    }