LTDescr.setDelay C# (CSharp) Method

setDelay() public method

public setDelay ( float delay ) : LTDescr
delay float
return LTDescr
    public LTDescr setDelay( float delay )
    {
        this.delay = delay;

        return this;
    }

Usage Example

Beispiel #1
0
        //IEnumerator HandleTweenDelayed()
        //{
        //    float counter = 0;
        //    while (counter < delay)
        //    {
        //        counter += Time.deltaTime;
        //        yield return null;
        //    }
        //    HandleTween();
        //}

        //IEnumerator Activate()
        //{
        //    float counter = 0;
        //    while (counter < delay)
        //    {
        //        counter += Time.deltaTime;
        //        yield return null;
        //    }
        //    objectToAnimate.SetActive(true);
        //}

        public void HandleTween()
        {
            if (objectToAnimate == null)
            {
                objectToAnimate = gameObject;
            }

            switch (animationType)
            {
            case UIAnimationType.Fade:
                Fade();
                break;

            case UIAnimationType.Move:
                Move();
                break;

            case UIAnimationType.MoveAbsolute:
                MoveAbsolute();
                break;

            case UIAnimationType.Scale:
                Scale();
                break;

            case UIAnimationType.ScaleX:
                ScaleX();
                break;

            case UIAnimationType.ScaleY:
                ScaleY();
                break;

            default:
                break;
            }

            _tweenObject.setDelay(delay);
            _tweenObject.setEase(easeType);

            if (loop)
            {
                _tweenObject.loopCount = int.MaxValue;
            }
            if (pingpong)
            {
                _tweenObject.setLoopPingPong();
            }
        }
All Usage Examples Of LTDescr::setDelay
LTDescr