예제 #1
0
        /// <summary>
        /// PickRandomDirection is used by InitializeParticles to decide which direction
        /// particles will move. The default implementation is a random vector in a
        /// circular pattern.
        /// </summary>
        protected virtual Vector2 PickRandomDirection()
        {
            float angle = RandomHelper.RandomBetween(0, MathHelper.TwoPi);

            return(new Vector2((float)Math.Cos(angle), (float)Math.Sin(angle)));
        }