Esempio n. 1
0
    private async void AdjustShroud(ShroudPreference pref)
    {
        await Task.Delay(TimeSpan.FromSeconds(0.1f));

        if (!pref.shroudActive)
        {
            shroudImg.enabled = false;
            return;
        }
        DoAdjust();
        shroudImg.enabled = true;
        holeMat.SetFloat("_Radius", pref.holeRadius);
        holeMat.SetFloat("_Shape", pref.holeShape);
    }
Esempio n. 2
0
    IEnumerator AdjustShroud(ShroudPreference pref)
    {
        yield return(YieldHelper.DeciSecond);

        if (!pref.shroudActive)
        {
            shroudImg.enabled = false;

            yield break;
        }

        DoAdjust();
        holeMat.SetColor("_Color", pref.shroudColor);
        holeMat.SetFloat("_Radius", pref.holeRadius);
        holeMat.SetFloat("_Shape", pref.holeShape);

        shroudImg.enabled = true;
    }
Esempio n. 3
0
    IEnumerator AdjustShroud(ShroudPreference pref)
    {
        yield return(WaitFor.Seconds(.1f));

        if (!pref.shroudActive)
        {
            shroudImg.enabled = false;
            MonitorTarget     = false;
            yield break;
        }

        MonitorTarget = true;
        holeMat.SetColor("_Color", pref.shroudColor);
        holeMat.SetFloat("_Radius", pref.holeRadius);
        holeMat.SetFloat("_Shape", pref.holeShape);

        shroudImg.enabled = true;
    }