Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        ws.Send(levelTimer.GetTimeRemaining().ToString("0.000"));
        if (Input.GetMouseButtonDown(0) && sendClick)
        {
            ws.Send("switch");
            switchValue = !switchValue;
            if (switchValue)
            {
                switchColor = Color.green;
            }
            else
            {
                switchColor = Color.red;
            }

            switchIndicator.renderer.material.color = switchColor;
        }
    }