Exemplo n.º 1
0
    public void OnPointerDown(PointerEventData eventData)
    {
        ButtonData button = this.transform.GetComponent <ButtonData>();

        Debug.Log("button " + button.GetButtonName() + " pressed, message = " + button.GetButtonMessage());
        byte[] message = StringToByteArray(button.GetButtonMessage());
        //for (int i = 0; i < message.Length; i++)
        //     Debug.Log(message[i]);
        BluetoothController.SetMessage(message);
        isMoving = true;

        oldPosition = transform.position;

        clickOffset = Input.mousePosition - transform.position;
    }