using Godot; using System.Collections.Generic; using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] public partial class StopMusic:Action { [Export] public AudioStreamPlayer music; [ExportToolButton( "Set Reference Name" )] public Callable setReferencedNameButton => Callable.From( ()=> { if ( music == null ) { this.Name = "Stop (nothing)"; } else { this.Name = "Stop " + music.Name; } } ); protected override void _OnTrigger() { music.Stop(); } } }