protected virtual IEnumerator DelayedUseAction(object sender, InteractableObjectEventArgs e, float deleay)
        {
            float
                fadeTime    = deleay,
                elapsedTime = 0f;

            while (elapsedTime < fadeTime)
            {
                elapsedTime += Time.unscaledDeltaTime;
                yield return(null);
            }
            // grab the object

            InteractableObjectUsed(sender, e);
            //CheckUse(e.interactingObject);
            linkedObject.OnInteractableObjectUsed(e);

            // TODO: @msaw - figure out if we need the animation reset or if it's stalling the animation
            //RewindAnimation();


            log.InfoMS($"+Delayed Use Action+ {delayTillUsable}");
        }
Esempio n. 2
0
        public void Press()
        {
            if (!IsActive() || !IsInteractable())
            {
                return;
            }

            DoStateTransition(SelectionState.Pressed, true);

            if (debug)
            {
                log.InfoMS("Pressed");
            }
        }