Пример #1
0
        public void Render(Canvas2D canvas, RenderTarget target)
        {
            Vector offset = Vector.Zero;
            if (ShakeLength > 0)
            {
                offset.X = (float)(m_random.NextDouble() - 0.5) * ShakeLength;
                offset.Y = (float)(m_random.NextDouble() - 0.5) * ShakeLength;
            }

            float progress = 1;
            canvas.DrawSprite(canvas.Region + offset, target.ToSprite(),
                ColorU.White.SemiTransparent(progress));
        }