Sound.gd 278 B

1234567891011121314151617
  1. extends AudioStreamPlayer2D
  2. const PITCH_MIN = 0.8
  3. const PITCH_MAX = 2.6
  4. func trigger():
  5. play(0.0)
  6. func _on_trigger_area_entered(area):
  7. trigger()
  8. func _on_star_note_changed(new_note: Music.Note, octave: int):
  9. set_pitch_scale(Music.scale_note_octave(new_note, octave))