Exemplo n.º 1
0
        public RectangularRingAnimation(float innerSizeX, float innerSizeZ)
        {
            _ring = new RectangularRing
            {
                InnerSizeX = innerSizeX,
                InnerSizeZ = innerSizeZ,
                OuterSize  = Width
            };
            _animators = new[]
            {
                new Animator(Easing.CubicOut, innerSizeX, v =>
                {
                    _ring.InnerSizeX = v;
                }, innerSizeX / 2f, 1),

                new Animator(Easing.CubicOut, innerSizeZ, v =>
                {
                    _ring.InnerSizeZ = v;
                }, innerSizeZ / 2f, 1),

                new Animator(Easing.CubicOut, 1, o =>
                {
                    _ring.Opacity = o;
                }, -1, 1.5f)
            };
        }
 public RectangularRingHalo(float innerSizeX, float innerSizeZ)
 {
     _ring = new RectangularRing
     {
         InnerSizeX = innerSizeX,
         InnerSizeZ = innerSizeZ,
         OuterSize  = Width
     };
     _animators = new[]
     {
         new Animator(Easing.CubicOut, 1, o =>
         {
             _ring.Opacity = o;
         }, -1, 1.5f)
     };
 }