Exemple #1
0
    void Update()
    {
        processEvents();
        if (Input.GetKeyDown(KeyCode.A))
        {
//			print ("connected?: " + tuioInput.isConnected());
            if (!tuioInput.isConnected())
            {
                tuioInput.Connect();
            }
        }
    }
Exemple #2
0
    void updateStatus()
    {
        currentFPS = accum / frames;
        // display two fractional digits (f2 format)
        fpsString = "UT-FPS: " + currentFPS.ToString("f2");
        timeleft  = updateInterval;
        accum     = 0.0f;
        frames    = 0;

        if (inputController.isConnected())
        {
            connectedString = "\nConnected: YES";
        }
        else
        {
            connectedString = "\nConnected: NO";
        }
        statusString     = "\nStatus: " + inputController.getStatusString();
        frameCountString = "\nFSEQ: " + inputController.currentFrame();

        GetComponent <GUIText>().text = fpsString + connectedString + statusString + frameCountString;
    }