Star.gd 357 B

1234567891011121314151617181920
  1. extends PathFollow2D
  2. # a moving music player
  3. signal note_changed(new_note: Music.Note)
  4. const RAYON = 20
  5. @export var speed: float = 200.0
  6. @export var note: Music.Note = Music.Note.A
  7. func _ready():
  8. emit_signal("note_changed", note)
  9. func _physics_process(delta):
  10. progress += speed * delta
  11. func _draw():
  12. draw_circle(Vector2.ZERO, RAYON, Color.WHITE)