Exemple #1
0
        /// <summary>
        /// Constructor. Semi-internal - If you use this be prepared for changes. The best way is to use named
        /// parameters for all optional arguments!
        /// </summary>
        /// <param name="target"></param>
        /// <param name="delay"></param>
        /// <param name="duration"></param>
        /// <param name="transitionMode"></param>
        /// <param name="timeUpdateMethod"></param>
        /// <param name="tweenType"></param>
        /// <param name="animationCurve"></param>
        /// <param name="coordinateSpace"></param>
        /// <param name="onStart"></param>
        /// <param name="onUpdate"></param>
        /// <param name="onComplete"></param>
        public TransitionStep(UnityEngine.GameObject target = null,
                              float delay    = 0,
                              float duration = 0.5f,
                              TransitionModeType transitionMode     = TransitionModeType.Specified,
                              TimeUpdateMethodType timeUpdateMethod = TimeUpdateMethodType.GameTime,
                              TransitionHelper.TweenType tweenType  = TransitionHelper.TweenType.linear,
                              AnimationCurve animationCurve         = null,
                              CoordinateSpaceType coordinateSpace   = CoordinateSpaceType.Global,
                              Action <TransitionStep> onStart       = null,
                              Action <TransitionStep> onUpdate      = null,
                              Action <TransitionStep> onComplete    = null)
        {
            Target           = target;
            Delay            = delay;
            Duration         = duration;
            TransitionMode   = transitionMode;
            TimeUpdateMethod = timeUpdateMethod;
            TweenType        = tweenType;
            AnimationCurve   = animationCurve ?? AnimationCurve.EaseInOut(0, 0, 1, 1);
            CoordinateSpace  = coordinateSpace;

            AddOnStartAction(onStart);
            AddOnUpdateAction(onUpdate);
            AddOnCompleteAction(onComplete);
        }
Exemple #2
0
 public TransitionStepValue(GameObject target = null,
                            float delay       = 0,
                            float duration    = 0.5F,
                            TransitionModeType transitionMode     = TransitionModeType.Specified,
                            TimeUpdateMethodType timeUpdateMethod = TimeUpdateMethodType.GameTime,
                            TransitionHelper.TweenType tweenType  = TransitionHelper.TweenType.linear,
                            AnimationCurve animationCurve         = null,
                            CoordinateSpaceType coordinateSpace   = CoordinateSpaceType.Global,
                            Action <TransitionStep> onStart       = null,
                            Action <TransitionStep> onUpdate      = null,
                            Action <TransitionStep> onComplete    = null) :
     base(target, delay, duration, transitionMode, timeUpdateMethod, tweenType, animationCurve, coordinateSpace, onStart, onUpdate, onComplete)
 {
 }
Exemple #3
0
 public TransitionStepFloat(UnityEngine.GameObject target = null,
                            float?startValue = null,
                            float?endValue   = null,
                            float delay      = 0,
                            float duration   = 0.5f,
                            TransitionModeType transitionMode    = TransitionModeType.Specified,
                            TransitionHelper.TweenType tweenType = TransitionHelper.TweenType.linear,
                            AnimationCurve animationCurve        = null,
                            CoordinateSpaceType coordinateSpace  = CoordinateSpaceType.Global,
                            Action onStart          = null,
                            Action <float> onUpdate = null,
                            Action onComplete       = null) :
     base(target, delay, duration, transitionMode, tweenType, animationCurve, coordinateSpace, onStart, onUpdate, onComplete)
 {
     StartValue    = startValue.GetValueOrDefault();
     EndValue      = endValue.GetValueOrDefault();
     OriginalValue = GetCurrent();
 }
 public Move(UnityEngine.GameObject target,
     Vector3? startPosition = null,
     Vector3? endPosition = null,
     float delay = 0,
     float duration = 0.5f,
     TransitionModeType transitionMode = TransitionModeType.Specified,
     TransitionHelper.TweenType tweenType = TransitionHelper.TweenType.linear,
     AnimationCurve animationCurve = null,
     CoordinateSpaceType coordinateSpace = CoordinateSpaceType.Global,
     Action onStart = null,
     Action<float> onUpdate = null,
     Action onComplete = null)
     : base(target, startPosition, endPosition, delay: delay, duration: duration, transitionMode: transitionMode, tweenType: tweenType,
         animationCurve: animationCurve, coordinateSpace: coordinateSpace, onStart: onStart, onUpdate: onUpdate, onComplete: onComplete)
 {
     //TODO: Validation . where to place!
     //if (MoveMode == MoveModeType.AnchoredPosition)
     //    Assert.IsNotNull(Target.transform as RectTransform, "The target of TransitionMove must contain a RectTransform component (not just a standard Transform component) when using MoveMode of type AnchoredPosition");
 }
 public Move(UnityEngine.GameObject target,
             Vector3?startPosition                = null,
             Vector3?endPosition                  = null,
             float delay                          = 0,
             float duration                       = 0.5f,
             TransitionModeType transitionMode    = TransitionModeType.Specified,
             TransitionHelper.TweenType tweenType = TransitionHelper.TweenType.linear,
             AnimationCurve animationCurve        = null,
             CoordinateSpaceType coordinateSpace  = CoordinateSpaceType.Global,
             Action onStart                       = null,
             Action <float> onUpdate              = null,
             Action onComplete                    = null) :
     base(target, startPosition, endPosition, delay: delay, duration: duration, transitionMode: transitionMode, tweenType: tweenType,
          animationCurve: animationCurve, coordinateSpace: coordinateSpace, onStart: onStart, onUpdate: onUpdate, onComplete: onComplete)
 {
     //TODO: Validation . where to place!
     //if (MoveMode == MoveModeType.AnchoredPosition)
     //    Assert.IsNotNull(Target.transform as RectTransform, "The target of TransitionMove must contain a RectTransform component (not just a standard Transform component) when using MoveMode of type AnchoredPosition");
 }
        /// <summary>
        /// Constructor. Semi-internal - If you use this be prepared for changes. The best way is to use named 
        /// parameters for all optional arguments!
        /// </summary>
        /// <param name="target"></param>
        /// <param name="delay"></param>
        /// <param name="duration"></param>
        /// <param name="transitionMode"></param>
        /// <param name="tweenType"></param>
        /// <param name="animationCurve"></param>
        /// <param name="coordinateSpace"></param>
        /// <param name="onStart"></param>
        /// <param name="onUpdate"></param>
        /// <param name="onComplete"></param>
        public TransitionStep(UnityEngine.GameObject target = null,
            float delay = 0,
            float duration = 0.5f,
            TransitionModeType transitionMode = TransitionModeType.Specified,
            TransitionHelper.TweenType tweenType = TransitionHelper.TweenType.linear,
            AnimationCurve animationCurve = null,
            CoordinateSpaceType coordinateSpace = CoordinateSpaceType.Global,
            Action onStart = null,
            Action<float> onUpdate = null, 
            Action onComplete = null)
        {
            Target = target;
            Delay = delay;
            Duration = duration;
            TransitionMode = transitionMode;
            TweenType = tweenType;
            AnimationCurve = animationCurve == null ? AnimationCurve.EaseInOut(0, 0, 1, 1) : animationCurve;
            CoordinateSpace = coordinateSpace;

            AddOnStartAction(onStart);
            AddOnUpdateAction(onUpdate);
            AddOnCompleteAction(onComplete);
        }
 /// <summary>
 /// Set the coordinate mode for this transition (see individual items for the exact modes supported for each item)
 /// </summary>
 /// <param name="coordinateMode"></param>
 /// <returns></returns>
 public TransitionStep SetCoordinateMode(CoordinateSpaceType coordinateMode)
 {
     CoordinateSpace = coordinateMode;
     return(this);
 }
Exemple #8
0
 public void TransformPoints(CoordinateSpaceType destSpace, CoordinateSpaceType srcSpace, PointF[] pts)
 {
     _g.TransformPoints((CoordinateSpace)destSpace, (CoordinateSpace)srcSpace, pts);
 }
 public void TransformPoints(CoordinateSpaceType destSpace, CoordinateSpaceType srcSpace, PointF[] pts)
 {
     _g.TransformPoints((CoordinateSpace) destSpace, (CoordinateSpace) srcSpace, pts);
 }
 /// <summary>
 /// Set the coordinate mode for this transition (see individual items for the exact modes supported for each item)
 /// </summary>
 /// <param name="coordinateMode"></param>
 /// <returns></returns>
 public TransitionStep SetCoordinateMode(CoordinateSpaceType coordinateMode)
 {
     CoordinateSpace = coordinateMode;
     return this;
 }