コード例 #1
0
ファイル: Fan.cs プロジェクト: tycobbb/insomnia
    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);
        }
    }
コード例 #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);
        }
    }