예제 #1
0
    IEnumerator _UpdateBar(MenuBar bar, string key, int direction)
    {
        int i = 0;

        while (Input.GetKey(key) && !Input.GetKey(Prefs.Keys.Up) && !Input.GetKey(Prefs.Keys.Down))
        {
            bar.ChangeBar(direction);
            if (i < 4)
            {
                yield return(new WaitForSeconds(0.25f));
            }
            if (i == 4)
            {
                yield return(new WaitForSeconds(0.4f));
            }
            else
            {
                yield return(new WaitForSeconds(0.1f));
            }
        }
    }