Example #1
0
    void ControlKey()
    {
        if (Input.GetKeyDown(keyCode))
        {
            oscillator.NoteOn();
            keyImage.color = Color.grey;
        }

        if (Input.GetKeyUp(keyCode))
        {
            oscillator.NoteOff();
            keyImage.color = Color.white;
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Application.Quit();
        }
    }