Beispiel #1
0
        /// <summary>
        /// Fade extension method for TransitionStep
        /// </summary>
        /// <typeparam name="T">interface type</typeparam>
        /// <param name="TransitionStep"></param>
        /// <returns></returns>
        public static ScreenWipe ScreenWipe(this TransitionStep transitionStep,
                                            Texture2D maskTexture,
                                            bool invertMask   = false,
                                            Color?color       = null,
                                            Texture2D texture = null,
                                            float softness    = 0,
                                            float delay       = 0,
                                            float duration    = 0.5f,
                                            TransitionHelper.TweenType tweenType = TransitionHelper.TweenType.linear,
                                            AnimationCurve animationCurve        = null,
                                            Action onStart          = null,
                                            Action <float> onUpdate = null,
                                            Action onComplete       = null)
        {
            var newTransitionStep = new ScreenWipe(transitionStep.Target,
                                                   maskTexture,
                                                   invertMask,
                                                   color,
                                                   texture,
                                                   softness,
                                                   delay,
                                                   duration,
                                                   tweenType,
                                                   animationCurve,
                                                   onStart,
                                                   onUpdate,
                                                   onComplete);

            transitionStep.AddOnCompleteTransitionStep(newTransitionStep);
            newTransitionStep.Parent = transitionStep;
            return(newTransitionStep);
        }
 /// <summary>
 /// Fade extension method for TransitionStep
 /// </summary>
 /// <typeparam name="T">interface type</typeparam>
 /// <param name="TransitionStep"></param>
 /// <returns></returns>
 public static ScreenWipe ScreenWipe(this TransitionStep transitionStep,
     Texture2D maskTexture,
     bool invertMask = false,
     Color? color = null,
     Texture2D texture = null,
     float delay = 0,
     float duration = 0.5f,
     TransitionHelper.TweenType tweenType = TransitionHelper.TweenType.linear,
     AnimationCurve animationCurve = null,
     Action onStart = null,
     Action<float> onUpdate = null,
     Action onComplete = null)
 {
     var newTransitionStep = new ScreenWipe(transitionStep.Target,
         maskTexture,
         invertMask,
         color,
         texture,
         delay,
         duration,
         tweenType,
         animationCurve,
         onStart,
         onUpdate,
         onComplete);
     transitionStep.AddOnCompleteTransitionStep(newTransitionStep);
     newTransitionStep.Parent = transitionStep;
     return newTransitionStep;
 }