Ejemplo n.º 1
0
        protected override void GetParticlePositionAndOrientation(Snapshot snap, ref Vector2 position, ref Vector2 orientation)
        {
            SpiralSnapshot spiralSnap = (SpiralSnapshot)snap;

            float angle = MathHelper.Lerp(0f, MathHelper.TwoPi, _curTime);

            position.X = orientation.X = (float)Math.Sin(angle);
            position.Y = orientation.Y = (float)Math.Cos(angle);

            position.X *= spiralSnap.Radius;
            position.Y *= spiralSnap.Radius;
        }
Ejemplo n.º 2
0
        protected override void TakeSnapshot(ref Snapshot snap)
        {
            SpiralSnapshot spiralSnap = (SpiralSnapshot)snap;

            spiralSnap.Radius = _radius;
        }