Ejemplo n.º 1
0
            /// <summary>
            ///     Initializes a new instance of the <see cref="SnowParticle" /> class.
            /// </summary>
            /// <param name="Rectangle">
            ///     The rectangle.
            /// </param>
            /// <param name="MaxOffset">
            ///     The max offset.
            /// </param>
            public SnowParticle(Render.Rectangle Rectangle, int MaxOffset = 15)
            {
                this._maxOffset = MaxOffset;
                this._rectangle = Rectangle;

                Rectangle.Add();

                this._x = Rectangle.X;
                this._modifier = Program.Random.Next(1, 5);

                if (Program.Random.Next(0, 1000) >= Program.Random.Next(0, 1000))
                {
                    this._modifier = -this._modifier;
                }
            }