Exemple #1
0
    private IEnumerator EnableAsync()
    {
        mHover.Reset();

        // automatically trigger interaction after a few seconds
        yield return(new WaitForSeconds(kAutoInteractDelay));

        if (mHover.enabled && Game.Get().CanAdvancePast(kStep))
        {
            mHover.InteractWith(this);
        }
    }
Exemple #2
0
    private IEnumerator EnableAsync()
    {
        // enable after a few seconds
        yield return(new WaitForSeconds(kEnableDelay));

        fMoon.SetActive(true);
        mHover.Reset();
        mAnimator.Play(kShowMoonAnim);

        // auto-interact after a few seconds
        yield return(new WaitForSeconds(kAutoInteractDelay));

        if (mHover.enabled && Game.Get().CanAdvancePast(kStep))
        {
            mHover.InteractWith(this);
        }
    }