public TransitionEffectSettings(int transitionID, FrameLayerPair layerAddress, AnimationTypesTransitionEffectType efTypeFlag, Action<TransitionEffectSettings> wildCardHandler)
        {
            this.TransitionID = transitionID;
            this.LayerAddress = layerAddress;

            if (AnimationUtils.CountTransitionEffects(efTypeFlag) > 1 ||
                efTypeFlag == AnimationTypesTransitionEffectType.None)
            {
                throw new ArgumentException("Transition effect type argument should only contain 1 flag and should not be TransitionEffectType.None",
                                            "efTypeFlag");
            }//end if

            this.EffectType = efTypeFlag;
            this.WildcardHandler = wildCardHandler;

            this.Duration = 0.5d;
            this.RotationCount = 1;
            this.Delay = 0d;
        }
Ejemplo n.º 2
0
        public static int CountTransitionEffects(AnimationTypesTransitionEffectType val)
        {
            int[] values = (int[])Enum.GetValues (typeof(AnimationTypesTransitionEffectType));
            int toReturn = 0;

            if (val == AnimationTypesTransitionEffectType.None) {
                toReturn = 1;
            } else {

                for (int i = 1; i < values.Length; i++) {

                    if (val.HasFlag ((AnimationTypesTransitionEffectType)values [i])) {
                        toReturn++;
                    }//end if

                }//end for

            }//end if else

            return toReturn;
        }
 public TransitionEffectMapping(AnimationTypesTransitionEffectType efType, FrameLayerPair ownerLayer)
 {
     this.EffectType = efType;
     this.OwnerLayer = ownerLayer;
 }