예제 #1
0
    IEnumerator ShowHint(Hint hint, float delay, float showTime)
    {
        showingHint = true;
        yield return(new WaitForSeconds(delay));

        StartCoroutine(hint.FadeIn());
        float t        = 0;
        bool  hintDone = false;

        while (!hintDone)
        {
            t += Time.deltaTime;
            yield return(null);

            if (t > showTime || hint.action.GetState(SteamVR_Input_Sources.Any))
            {
                hintDone = true;
            }
            showingHint = true;
        }
        StartCoroutine(hint.FadeOut());
        yield return(new WaitForSeconds(1));

        showingHint = false;
    }