Ejemplo n.º 1
0
    protected virtual void Update()
    {
        if (userGazingAtMe && timeLeftToSelect > 0f)
        {
            timeLeftToSelect -= Time.deltaTime;

            float progress = (timeNeededToSelect - timeLeftToSelect) / timeNeededToSelect;
            selectionRadial.SetProgress(progress);

            if (timeLeftToSelect <= 0f)
            {
                InvokeAction();
                selectionRadial.OnInvokeAction();
                if (canRunMultipleTimesInARow)
                {
                    timeLeftToSelect = timeNeededToSelect;
                }
            }
        }
    }