Exemplo n.º 1
0
        protected override void ParticleDraw(int index, Microsoft.Xna.Framework.Graphics.SpriteBatch batch)
        {
            sourceRectangle.X = (index % 4) * particleWidth;
            pRotation         = Easing.EaseOutQuad(t, 0, r0 * 31.4159f * 10);

            float len = Easing.EaseOutElastic(t * .5f, 0, r0 * 100, 400);
            float pt  = index / (float)particleCount;

            pPosition.X = (float)Easing.Sin(pt, 0, len) + effectPosition.X;
            pPosition.Y = (float)Easing.Cos(pt, 0, len) + effectPosition.Y;

            base.ParticleDraw(index, batch);
        }