// Copyright (c) Craftwork Games. All rights reserved.
// Licensed under the MIT license.
// See LICENSE file in the project root for full license information.
using System;
using Microsoft.Xna.Framework;
namespace MonoGame.Extended.Particles.Data;
///
/// Defines the parameters used when releasing particles from an emitter.
///
///
/// This class encapsulates all the configurable properties that control how particles are initialized when they are
/// created by the particle system. Each property can be set as either a constant value or a random range.
///
public class ParticleReleaseParameters
{
///
/// Gets or sets the number of particles to release in a single emission.
///
///
/// Defaults to a random value between 5 and 100 particles per emission.
///
public ParticleInt32Parameter Quantity = new ParticleInt32Parameter(5, 100);
///
/// Gets or sets the initial speed of particles when released.
///
///
/// Defaults to a random value between 50.0 and 100.0 units per second.
///
public ParticleFloatParameter Speed = new ParticleFloatParameter(50.0f, 100.0f);
///
/// Gets or sets the initial color of particles when released.
///
///
/// Defaults to white (1.0f, 1.0f, 1.0f).
///
public ParticleColorParameter Color = new ParticleColorParameter(new Vector3(1.0f, 1.0f, 1.0f));
///
/// Gets or sets the initial opacity of particles when released.
///
///
/// Defaults to a random value between 0.0 (transparent) and 1.0 (opaque).
///
public ParticleFloatParameter Opacity = new ParticleFloatParameter(0.0f, 1.0f);
///
/// Gets or sets the initial scale of particles when released.
///
///
/// Defaults to a random value between 0.0 (half scale) and 1.0 (full scale)
///
public ParticleVector2Parameter Scale = new ParticleVector2Parameter(new Vector2(0.5f, 0.5f), new Vector2(1.0f, 1.0f));
///
/// Gets or sets the initial rotation (in radians) of particles when released.
///
///
/// Defaults to a random value between -π and π radians (a full 360° range).
///
public ParticleFloatParameter Rotation = new ParticleFloatParameter(-MathF.PI, MathF.PI);
///
/// Gets or sets the mass of particles when released.
///
///
/// Defaults to a constant value of 1.0.
///
public ParticleFloatParameter Mass = new ParticleFloatParameter(1.0f);
///
/// Initializes a new instance of the class with default values.
///
///
/// Default values for properties:
///
///
///
/// Property
/// Default Value
///
/// -
/// Quantity
/// Random: 5-100 particles
///
/// -
/// Speed
/// Random: 50.0-100.0 units/second
///
/// -
/// Color
/// Constant: White (1.0, 1.0, 1.0)
///
/// -
/// Opacity
/// Random: 0.0-1.0
///
/// -
/// Scale
/// Random: 0.5-1.0
///
/// -
/// Rotation
/// Random: -π to π radians
///
/// -
/// Mass
/// Constant: 1.0
///
///
///
///
public ParticleReleaseParameters() { }
}