LTDescr.callOnCompletes C# (CSharp) Method

callOnCompletes() public method

public callOnCompletes ( ) : void
return void
    public void callOnCompletes()
    {
        if(this.type==TweenAction.GUI_ROTATE)
            this._optional.ltRect.rotateFinished = true;

        if(this.type==TweenAction.DELAYED_SOUND){
            AudioSource.PlayClipAtPoint((AudioClip)this._optional.onCompleteParam, this.to, this.from.x);
        }
        if(this._optional.onComplete!=null){
            this._optional.onComplete();
        }else if(this._optional.onCompleteObject!=null){
            this._optional.onCompleteObject(this._optional.onCompleteParam);
        }
    }

Usage Example

Beispiel #1
0
        public override void OnPointerClick(PointerEventData eventData)
        {
            switch (eventData.button)
            {
            case PointerEventData.InputButton.Left:
                callback?.Invoke();
                break;

            case PointerEventData.InputButton.Right:
                if (leanTween != null)
                {
                    leanTween.callOnCompletes();
                    LeanTween.cancel(leanTween.uniqueId);
                }
                else
                {
                    Destroy(gameObject);
                }
                break;

            case PointerEventData.InputButton.Middle:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
All Usage Examples Of LTDescr::callOnCompletes
LTDescr