using Godot; using Rokojori.Extensions; namespace Rokojori; [Tool] [GlobalClass] public partial class MusicData: Resource { [Export] public Godot.AudioStream audio; [Export( PropertyHint.Range, "0,1")] public float volume = 1f; [Export( PropertyHint.Range, "-36,36")] public float pitchSemitonesOffset = 0f; public override string ToString() { var prefix = pitchSemitonesOffset == 0 ? "+/-" : pitchSemitonesOffset > 0 ? "+" : ""; var volumeString = ( int) ( 100 * volume); return "MusicData: " + volumeString+ "% (" + prefix + pitchSemitonesOffset + " st) " + audio.ResourcePath; } }