namespace Editor.MapEditor.EntityDefinitions;
///
/// Plays a sound event from a point, passes along the min and max positions of its AABB.
///
[Library( "snd_event_alignedbox" ), HammerEntity]
[EditorSprite( "editor/snd_event.vmat" ), VisGroup( VisGroup.Sound )]
[Title( "Sound Event Aligned Box" ), Category( "Sound" ), Icon( "speaker_phone" )]
[BoundsHelper( "mins", "maxs", true, false )]
class SoundEventBoxEntity : HammerEntityDefinition
{
///
/// Name of the sound to play.
///
[Property( "soundName" ), FGDType( "sound" )]
public string SoundName { get; set; }
///
/// Start the sound on spawn
///
[Property( "startOnSpawn" )]
public bool StartOnSpawn { get; set; }
///
/// Stop the sound before starting to play it again
///
[Property( "stopOnNew" ), Title( "Stop before repeat" )]
public bool StopOnNew { get; set; }
///
/// Setting this to true will override default sound parameters
///
[Property( "overrideParams" ), Title( "Override Default" ), Category( "Sound Parameters" )]
public bool OverrideSoundParams { get; set; } = false;
///
/// Set the volume of the sound
///
[Property( "soundVolume" ), Title( "Volume" ), Category( "Sound Parameters" )]
[MinMax( 0.0f, 1.0f )]
public float SoundVolume { get; set; } = 1.0f;
///
/// Set the pitch of the sound
///
[Property( "soundPitch" ), Title( "Pitch" ), Category( "Sound Parameters" )]
[MinMax( 0.0f, 2.0f )]
public float SoundPitch { get; set; } = 1.0f;
[Property( "mins", Title = "Box Mins" ), Category( "Box Size" )]
[DefaultValue( "-32 -32 -32" )]
public Vector3 Mins { get; set; } = new Vector3( -32, -32, -32 );
[Property( "maxs", Title = "Box Maxs" ), Category( "Box Size" )]
[DefaultValue( "32 32 32" )]
public Vector3 Maxs { get; set; } = new Vector3( 32, 32, 32 );
}