public class PlayOnce : Component { [Property] public bool Played {get; set;} [Property] public SoundEvent Event {get; set;} [Button] public void Play() { if (Played) return; Played = true; Sound.Play(Event); } }