Files
sbox-public/engine/Sandbox.Tools/MapEditor/HammerEntities/SoundScapeEntity.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

54 lines
1.5 KiB
C#

namespace Editor.MapEditor.EntityDefinitions;
/// <summary>
/// Plays a soundscape when you enter the bounds.
/// </summary>
[Library( "snd_soundscape_box" ), HammerEntity]
[EditorSprite( "editor/env_soundscape.vmat" ), VisGroup( VisGroup.Sound )]
[Title( "Soundscape Box" ), Category( "Sound" ), Icon( "speaker_group" )]
[BoundsHelper( "extents", true )]
class SoundScapeBoxEntity : HammerEntityDefinition
{
/// <summary>
/// Name of the soundscape to play.
/// </summary>
[Property( "soundscape" ), FGDType( "resource:sndscape" )]
public Soundscape Soundscape { get; set; }
/// <summary>
/// Is Enabled
/// </summary>
[Property( "enabled" )]
public bool Enabled { get; set; }
[Property( "extents", Title = "Extents" )]
[DefaultValue( "64 64 64" )]
public Vector3 Extents { get; set; } = new Vector3( 64, 64, 64 );
}
/// <summary>
/// Plays a soundscape when you enter the radius.
/// </summary>
[Library( "snd_soundscape" ), HammerEntity]
[EditorSprite( "editor/env_soundscape.vmat" ), VisGroup( VisGroup.Sound )]
[Title( "Soundscape" ), Category( "Sound" ), Icon( "speaker" )]
[Sphere( "radius" )]
class SoundScapeEntity : HammerEntityDefinition
{
/// <summary>
/// Name of the soundscape to play.
/// </summary>
[Property( "soundscape" ), FGDType( "resource:sndscape" )]
public Soundscape Soundscape { get; set; }
/// <summary>
/// Is Enabled
/// </summary>
[Property( "enabled" )]
public bool Enabled { get; set; }
[Property( "radius", Title = "Radius" )]
[DefaultValue( "64" )]
public float Radius { get; set; } = 64;
}