void Start()
    {
        io = GetComponent <SocketIO.SocketIOComponent>();
        io.On("NewPlayer", (SocketIO.SocketIOEvent e) =>
        {
            JSONObject data   = e.data;
            string playerID   = getField(data, "playerID");
            string playerName = getField(data, "playerName");
            createNewPlayer(playerID, playerName);
        });
        io.On("ButtonDown", (SocketIO.SocketIOEvent e) =>
        {
            JSONObject data      = e.data;
            string playerID      = getField(data, "playerID");
            string buttonPressed = getField(data, "button");

            player foundPlayer = getPlayer(playerID);
            Vector3 moveDir    = new Vector3(0f, 0f, 0f);
            Debug.Log(playerID + " pressed " + buttonPressed);
            switch (buttonPressed.ToString())
            {
            case "up":
                moveDir = new Vector3(0f, 1f, 0f);
                foundPlayer.setAimDirection("up");
                foundPlayer.move(moveDir);
                break;

            case "down":
                moveDir = new Vector3(0f, -1f, 0f);
                foundPlayer.setAimDirection("down");
                foundPlayer.move(moveDir);
                break;

            case "left":
                moveDir = new Vector3(-1f, 0f, 0f);
                foundPlayer.setAimDirection("left");
                foundPlayer.move(moveDir);
                break;

            case "right":
                moveDir = new Vector3(1f, 0f, 0f);
                foundPlayer.setAimDirection("right");
                foundPlayer.move(moveDir);
                break;

            case "fire":
                foundPlayer.FireWeapon(1);
                break;
            }
        });
    }