add ai, photo_mode and radio

This commit was merged in pull request #11.
This commit is contained in:
2026-05-05 20:33:00 +00:00
parent 72d06560b1
commit 70d3dfe15c
66 changed files with 1531 additions and 0 deletions

31
core/radio/radio.gd Normal file
View File

@@ -0,0 +1,31 @@
extends AudioStreamPlayer
class_name Radio
@export var playlist: Array[AudioStream] = []
var current_track_index: int = 0
func _ready():
finished.connect(next_track)
func play_track(index: int = current_track_index):
if playlist.is_empty():
return
current_track_index = posmod(index, playlist.size())
stream = playlist[current_track_index]
play()
stream_paused = false
func next_track():
play_track(current_track_index + 1)
func prev_track():
play_track(current_track_index - 1)
func toggle_pause():
stream_paused = !stream_paused
func stop_radio():
stop()
stream_paused = false