summaryrefslogtreecommitdiff
path: root/Plugins/MonoGame.Extended/source/MonoGame.Extended.Particles/Profiles/BoxFillProfile.cs
blob: e363713571f8a5ce491ed21097631346ee3f6d38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using Microsoft.Xna.Framework;

namespace MonoGame.Extended.Particles.Profiles
{
    public class BoxFillProfile : Profile
    {
        public float Width { get; set; }
        public float Height { get; set; }

        public override void GetOffsetAndHeading(out Vector2 offset, out Vector2 heading)
        {
            offset = new Vector2(Random.NextSingle(Width*-0.5f, Width*0.5f),
                Random.NextSingle(Height*-0.5f, Height*0.5f));

            Random.NextUnitVector(out heading);
        }
    }
}