Exemplo n.º 1
0
    // Directly jump to song with the title that starts with the letters hit on the keyboard
    private void UpdateFuzzySearchInput()
    {
        // When there is no keyboard input for a while, then reset the search term.
        if (fuzzySearchLastInputTimeInSeconds + fuzzySearchResetTimeInSeconds < Time.time)
        {
            fuzzySearchText = "";
        }

        string typedLetter = InputUtils.GetTypedLetter();

        if (!typedLetter.IsNullOrEmpty())
        {
            fuzzySearchLastInputTimeInSeconds = Time.time;
            fuzzySearchText += typedLetter;
            songSelectSceneController.JumpToSongWhereTitleStartsWith(fuzzySearchText);
        }
    }