/// <summary> /// Chain a function to be called and tween to be played when this one is done /// </summary> public virtual TweenBase Chain(TweenBase tween, System.Action initFunction) { if (tween == null) { throw new System.ArgumentNullException("tween"); } var completedCallback = this.TweenCompleted; this.TweenCompleted = (sender) => { if (completedCallback != null) { completedCallback(sender); } if (initFunction != null) { initFunction(); } tween.Play(); }; return(tween); }
/// <summary> /// Chain a function to be called and tween to be played when this one is done /// </summary> public virtual TweenBase Chain( TweenBase tween, System.Action initFunction ) { if( tween == null ) throw new System.ArgumentNullException( "tween" ); var completedCallback = this.TweenCompleted; this.TweenCompleted = ( sender ) => { if( completedCallback != null ) { completedCallback( sender ); } if( initFunction != null ) { initFunction(); } tween.Play(); }; return tween; }
/// <summary> /// Chain a tween to be played when this one is done /// </summary> public virtual TweenBase Chain(TweenBase tween) { return(Chain(tween, null)); }
/// <summary> /// Chain a tween to be played when this one is done /// </summary> public virtual TweenBase Chain( TweenBase tween ) { return Chain( tween, null ); }