// Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            print("Sending Spacebrew Message");
            // name, type, value
            // COMMON GOTCHA: THIS MUST MATCH THE NAME VALUE YOU TYPED IN THE EDITOR!!
            sbClient.sendMessage("buttonPress", "boolean", "true");
        }
        foreach (char c in Input.inputString)
        {
            print("Just pressed: " + c.ToString());
            if (c >= 'a' && c <= 'z')
            {
                sbClient.sendMessage("letters", "string", c.ToString());
                GameObject  go   = GameObject.Find("MatrixContainer");               // the name of your client object
                MatrixMaker grid = go.GetComponent <MatrixMaker> ();
                grid.ParseIncomingLetter(c.ToString());
                grid.delayLayer();
                //grid.CreateLayer(true);
            }
        }

        if (Input.touchCount > 0 && Input.touches[0].phase == TouchPhase.Began)
        {
            sbClient.sendMessage("buttonPress", "boolean", "true");
        }
    }
Пример #2
0
    // Sends a boolean message to SpaceBrew
    public void SendBool(string pubName, bool value)
    {
        string strValue = value ? "true" : "false";

//        print("Sending Spacebrew Message: " + strValue + " (BOOLEAN)");
        sbClient.sendMessage(pubName, "boolean", strValue);
    }
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown("space"))
     {
         print("Sending Spacebrew Message");
         // name, type, value
         // COMMON GOTCHA: THIS MUST MATCH THE NAME VALUE YOU TYPED IN THE EDITOR!!
         sbClient.sendMessage("mybool", "boolean", "true");
     }
 }
Пример #4
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            print("Sending Spacebrew Message");
            // name, type, value
            // COMMON GOTCHA: THIS MUST MATCH THE NAME VALUE YOU TYPED IN THE EDITOR!!
            sbClient.sendMessage("buttonPress", "boolean", "true");
        }

        //send message but no idea what it means
        foreach (char c in Input.inputString)
        {
            if (Input.touchCount > 0 && Input.touches[0].phase == TouchPhase.Began)
            {
                sbClient.sendMessage("buttonPress", "boolean", "true");
            }
        }
    }