Ejemplo n.º 1
0
        /// <summary>
        /// Adds interpolator to be available for Affectors
        /// <para>
        /// CEGUI ships with several basic interpolators that are always available,
        /// float, bool, colour, UDim, UVector2, ... but you can add your own
        /// custom interpolator if needed! just note that AnimationManager only
        /// deletes inbuilt interpolators. It will remove your interpolator if you
        /// don't do it yourself, but you definitely have to delete it yourself!
        /// </para>
        /// </summary>
        /// <param name="interpolator"></param>
        public void AddInterpolator(Interpolator interpolator)
        {
            if (d_interpolators.ContainsKey(interpolator.GetInterpolatorType()))
            {
                throw new AlreadyExistsException("Interpolator of type '"
                                                 + interpolator.GetInterpolatorType() + "' already exists.");
            }

            d_interpolators.Add(interpolator.GetInterpolatorType(), interpolator);
        }