add ai, photo_mode and radio #11
@@ -1,9 +1,9 @@
|
|||||||
[gd_scene format=3 uid="uid://clx701xdwelgx"]
|
[gd_scene format=3 uid="uid://clx701xdwelgx"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b30p1yqojbbbk" path="res://core/ai/ai_base/ai_base.gd" id="1_4d1nn"]
|
[ext_resource type="Script" uid="uid://b30p1yqojbbbk" path="res://core/ai/agents/base/ai_base.gd" id="1_4d1nn"]
|
||||||
[ext_resource type="Script" uid="uid://ps3vlu2qvmop" path="res://core/ai/ai_base/state_machine.gd" id="2_q1hg3"]
|
[ext_resource type="Script" uid="uid://ps3vlu2qvmop" path="res://core/ai/framework/state_machine.gd" id="2_q1hg3"]
|
||||||
[ext_resource type="Script" uid="uid://nga8qx56iwgu" path="res://core/ai/ai_base/idle_state.gd" id="3_26faq"]
|
[ext_resource type="Script" uid="uid://nga8qx56iwgu" path="res://core/ai/agents/base/idle_state.gd" id="3_26faq"]
|
||||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/ai_base/patrol_state.gd" id="4_lim44"]
|
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/agents/base/patrol_state.gd" id="4_lim44"]
|
||||||
|
|
||||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_mh3lg"]
|
[sub_resource type="CapsuleMesh" id="CapsuleMesh_mh3lg"]
|
||||||
|
|
||||||
31
core/audio/audio_manager.gd
Normal file
31
core/audio/audio_manager.gd
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
const MIN_VOLUME: float = 0.0
|
||||||
|
const MAX_VOLUME: float = 1.0
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
load_save_data()
|
||||||
|
|
||||||
|
func load_save_data() -> void:
|
||||||
|
for bus_name in GameState.save_data.audio_bus_volumes:
|
||||||
|
_apply_audio_bus_volume(bus_name, GameState.save_data.audio_bus_volumes[bus_name])
|
||||||
|
|
||||||
|
func set_audio_bus_volume(bus_name: StringName, linear_value: float) -> void:
|
||||||
|
var normalized_bus_name := str(bus_name)
|
||||||
|
var clamped_value := clampf(linear_value, MIN_VOLUME, MAX_VOLUME)
|
||||||
|
|
||||||
|
GameState.save_data.audio_bus_volumes[normalized_bus_name] = clamped_value
|
||||||
|
_apply_audio_bus_volume(normalized_bus_name, clamped_value)
|
||||||
|
GameState.save_game()
|
||||||
|
|
||||||
|
func get_audio_bus_volume(bus_name: StringName, default_value: float = 1.0) -> float:
|
||||||
|
return float(GameState.save_data.audio_bus_volumes.get(str(bus_name), default_value))
|
||||||
|
|
||||||
|
func _apply_audio_bus_volume(bus_name: String, linear_value: float) -> void:
|
||||||
|
var bus_index := AudioServer.get_bus_index(bus_name)
|
||||||
|
if bus_index == -1:
|
||||||
|
return
|
||||||
|
|
||||||
|
var clamped_value := clampf(linear_value, MIN_VOLUME, MAX_VOLUME)
|
||||||
|
AudioServer.set_bus_volume_db(bus_index, linear_to_db(clamped_value))
|
||||||
|
AudioServer.set_bus_mute(bus_index, is_zero_approx(clamped_value))
|
||||||
1
core/audio/audio_manager.gd.uid
Normal file
1
core/audio/audio_manager.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dcttbbavtwtsg
|
||||||
56
core/audio/settings/audio_option.gd
Normal file
56
core/audio/settings/audio_option.gd
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
extends VBoxContainer
|
||||||
|
|
||||||
|
class_name AudioOption
|
||||||
|
|
||||||
|
const MIN_VOLUME: float = 0.0
|
||||||
|
const MAX_VOLUME: float = 1.0
|
||||||
|
|
||||||
|
@export var bus_name: StringName = &"Master"
|
||||||
|
@export var label_text: String = "Master Volume"
|
||||||
|
@export_range(0.0, 1.0, 0.01) var default_volume: float = 1.0
|
||||||
|
|
||||||
|
@onready var label: Label = $Label
|
||||||
|
@onready var slider: HSlider = $HSlider
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
slider.min_value = MIN_VOLUME
|
||||||
|
slider.max_value = MAX_VOLUME
|
||||||
|
slider.step = 0.01
|
||||||
|
slider.value_changed.connect(_on_slider_value_changed)
|
||||||
|
refresh()
|
||||||
|
|
||||||
|
func refresh() -> void:
|
||||||
|
label.text = label_text
|
||||||
|
|
||||||
|
if not has_bus():
|
||||||
|
slider.set_value_no_signal(default_volume)
|
||||||
|
slider.editable = false
|
||||||
|
label.text = "%s (bus missing)" % label_text
|
||||||
|
return
|
||||||
|
|
||||||
|
slider.editable = true
|
||||||
|
var saved_volume := AudioManager.get_audio_bus_volume(bus_name, default_volume)
|
||||||
|
slider.set_value_no_signal(saved_volume)
|
||||||
|
apply_current_value()
|
||||||
|
|
||||||
|
func reset_to_default() -> void:
|
||||||
|
slider.value = default_volume
|
||||||
|
|
||||||
|
func apply_current_value() -> void:
|
||||||
|
_set_bus_volume(slider.value)
|
||||||
|
|
||||||
|
func has_bus() -> bool:
|
||||||
|
return get_bus_index() != -1
|
||||||
|
|
||||||
|
func get_bus_index() -> int:
|
||||||
|
return AudioServer.get_bus_index(bus_name)
|
||||||
|
|
||||||
|
func _set_bus_volume(linear_value: float) -> void:
|
||||||
|
if not has_bus():
|
||||||
|
return
|
||||||
|
|
||||||
|
var clamped_value := clampf(linear_value, MIN_VOLUME, MAX_VOLUME)
|
||||||
|
AudioManager.set_audio_bus_volume(bus_name, clamped_value)
|
||||||
|
|
||||||
|
func _on_slider_value_changed(value: float) -> void:
|
||||||
|
_set_bus_volume(value)
|
||||||
1
core/audio/settings/audio_option.gd.uid
Normal file
1
core/audio/settings/audio_option.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bnh1y560h55vc
|
||||||
14
core/audio/settings/audio_option.tscn
Normal file
14
core/audio/settings/audio_option.tscn
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[gd_scene format=3 uid="uid://cescrovsjlwke"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bnh1y560h55vc" path="res://core/audio/settings/audio_option.gd" id="1_orafl"]
|
||||||
|
|
||||||
|
[node name="AudioOption" type="VBoxContainer" unique_id=1509773712]
|
||||||
|
custom_minimum_size = Vector2(300, 0)
|
||||||
|
script = ExtResource("1_orafl")
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="." unique_id=781845786]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Master Volume"
|
||||||
|
|
||||||
|
[node name="HSlider" type="HSlider" parent="." unique_id=1286896253]
|
||||||
|
layout_mode = 2
|
||||||
36
core/audio/settings/settings_menu.gd
Normal file
36
core/audio/settings/settings_menu.gd
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
class_name SettingsMenu
|
||||||
|
|
||||||
|
@onready var audio_options_container: VBoxContainer = $%AudioOptionsContainer
|
||||||
|
@onready var reset_button: Button = $%ResetToDefault_Button
|
||||||
|
@onready var close_button: Button = $%Close_Button
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
reset_button.pressed.connect(_on_reset_to_default_button_pressed)
|
||||||
|
close_button.pressed.connect(_on_close_button_pressed)
|
||||||
|
_refresh_audio_options()
|
||||||
|
|
||||||
|
func _get_audio_options() -> Array[AudioOption]:
|
||||||
|
var audio_options: Array[AudioOption] = []
|
||||||
|
|
||||||
|
for child in audio_options_container.get_children():
|
||||||
|
if child is AudioOption:
|
||||||
|
audio_options.append(child)
|
||||||
|
|
||||||
|
return audio_options
|
||||||
|
|
||||||
|
func _refresh_audio_options() -> void:
|
||||||
|
for audio_option in _get_audio_options():
|
||||||
|
audio_option.refresh()
|
||||||
|
|
||||||
|
func _apply_current_audio_values() -> void:
|
||||||
|
for audio_option in _get_audio_options():
|
||||||
|
audio_option.apply_current_value()
|
||||||
|
|
||||||
|
func _on_reset_to_default_button_pressed() -> void:
|
||||||
|
for audio_option in _get_audio_options():
|
||||||
|
audio_option.reset_to_default()
|
||||||
|
|
||||||
|
func _on_close_button_pressed() -> void:
|
||||||
|
visible = false
|
||||||
1
core/audio/settings/settings_menu.gd.uid
Normal file
1
core/audio/settings/settings_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cvr25q1blyxg
|
||||||
74
core/audio/settings/settings_menu.tscn
Normal file
74
core/audio/settings/settings_menu.tscn
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
[gd_scene format=3 uid="uid://caqf471x0kttc"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cvr25q1blyxg" path="res://core/audio/settings/settings_menu.gd" id="1_4lekq"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cescrovsjlwke" path="res://core/audio/settings/audio_option.tscn" id="1_hwcco"]
|
||||||
|
|
||||||
|
[node name="SettingsMenu" type="Control" unique_id=1639777294]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_4lekq")
|
||||||
|
|
||||||
|
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=315821242]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -79.5
|
||||||
|
offset_top = -110.0
|
||||||
|
offset_right = 79.5
|
||||||
|
offset_bottom = 110.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer" unique_id=648635784]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 0
|
||||||
|
theme_override_constants/margin_left = 12
|
||||||
|
theme_override_constants/margin_top = 12
|
||||||
|
theme_override_constants/margin_right = 12
|
||||||
|
theme_override_constants/margin_bottom = 12
|
||||||
|
|
||||||
|
[node name="AudioOptionsContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer" unique_id=824023653]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
|
[node name="MasterVolume_AudioOption" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=1509773712 instance=ExtResource("1_hwcco")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=1053430754]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="MusicVolume_AudioOption" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=690924616 instance=ExtResource("1_hwcco")]
|
||||||
|
layout_mode = 2
|
||||||
|
bus_name = &"Music"
|
||||||
|
label_text = "Music Volume"
|
||||||
|
|
||||||
|
[node name="HSeparator2" type="HSeparator" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=453716295]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="SFXVolume_AudioOption" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=2096291127 instance=ExtResource("1_hwcco")]
|
||||||
|
layout_mode = 2
|
||||||
|
bus_name = &"SFX"
|
||||||
|
label_text = "SFX Volume"
|
||||||
|
|
||||||
|
[node name="HSeparator3" type="HSeparator" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=498553283]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ResetToDefault_Button" type="Button" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=720420423]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
text = "Reset To Default"
|
||||||
|
|
||||||
|
[node name="Close_Button" type="Button" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=1137906684]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
text = "Close"
|
||||||
@@ -3,11 +3,13 @@ extends Resource
|
|||||||
|
|
||||||
var unlocked_collectibles_ids: Array[String] = []
|
var unlocked_collectibles_ids: Array[String] = []
|
||||||
var saved_photos: Array[String] = []
|
var saved_photos: Array[String] = []
|
||||||
|
var audio_bus_volumes: Dictionary[String, float] = {}
|
||||||
|
|
||||||
func to_dictionary() -> Dictionary:
|
func to_dictionary() -> Dictionary:
|
||||||
return {
|
return {
|
||||||
"unlocked_collectibles_ids": unlocked_collectibles_ids,
|
"unlocked_collectibles_ids": unlocked_collectibles_ids,
|
||||||
"saved_photos": saved_photos,
|
"saved_photos": saved_photos,
|
||||||
|
"audio_bus_volumes": audio_bus_volumes,
|
||||||
}
|
}
|
||||||
|
|
||||||
static func from_dictionary(data: Dictionary) -> SaveGameData:
|
static func from_dictionary(data: Dictionary) -> SaveGameData:
|
||||||
@@ -21,4 +23,8 @@ static func from_dictionary(data: Dictionary) -> SaveGameData:
|
|||||||
for photo_path in data["saved_photos"]:
|
for photo_path in data["saved_photos"]:
|
||||||
save_game_data.saved_photos.append(str(photo_path))
|
save_game_data.saved_photos.append(str(photo_path))
|
||||||
|
|
||||||
|
if data.has("audio_bus_volumes") and data["audio_bus_volumes"] is Dictionary:
|
||||||
|
for bus_name in data["audio_bus_volumes"]:
|
||||||
|
save_game_data.audio_bus_volumes[str(bus_name)] = float(data["audio_bus_volumes"][bus_name])
|
||||||
|
|
||||||
return save_game_data
|
return save_game_data
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[gd_resource type="Resource" script_class="CollectibleLibrary" format=3 uid="uid://c6pkpvsvimafb"]
|
[gd_resource type="Resource" script_class="CollectibleLibrary" format=3 uid="uid://c6pkpvsvimafb"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bj34o0org55ei" path="res://core/photo_mode/collectible_resource.gd" id="1_3cgvf"]
|
[ext_resource type="Script" uid="uid://bj34o0org55ei" path="res://core/photo_mode/data/collectible_resource.gd" id="1_3cgvf"]
|
||||||
[ext_resource type="Script" uid="uid://hhuufh87skq5" path="res://core/photo_mode/collectible_library.gd" id="2_ggu10"]
|
[ext_resource type="Script" uid="uid://hhuufh87skq5" path="res://core/photo_mode/data/collectible_library.gd" id="2_ggu10"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cx8d233y32kmu" path="res://icon.svg" id="2_pxmdy"]
|
[ext_resource type="Texture2D" uid="uid://cx8d233y32kmu" path="res://icon.svg" id="2_pxmdy"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_3cgvf"]
|
[sub_resource type="Resource" id="Resource_3cgvf"]
|
||||||
@@ -3,7 +3,7 @@ extends Node
|
|||||||
signal on_collectible_unlocked(collectible_id: String)
|
signal on_collectible_unlocked(collectible_id: String)
|
||||||
signal on_photo_saved(filePath: String)
|
signal on_photo_saved(filePath: String)
|
||||||
|
|
||||||
var collectibles_library: CollectibleLibrary = preload("res://core/photo_mode/collectible_library.tres")
|
var collectibles_library: CollectibleLibrary = preload("res://core/photo_mode/data/collectible_library.tres")
|
||||||
|
|
||||||
var unlocked_collectibles_ids: Array[String] = []
|
var unlocked_collectibles_ids: Array[String] = []
|
||||||
var saved_photos: Array[String] = []
|
var saved_photos: Array[String] = []
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://bmkxt6btcx8qr"]
|
[gd_scene format=3 uid="uid://bmkxt6btcx8qr"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://62d14boivr3g" path="res://core/photo_mode/collectible.gd" id="1_xse8c"]
|
[ext_resource type="Script" uid="uid://62d14boivr3g" path="res://core/photo_mode/runtime/collectible.gd" id="1_xse8c"]
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xse8c"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_xse8c"]
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://vni5kjalum6d"]
|
[gd_scene format=3 uid="uid://vni5kjalum6d"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://d7ln6iru6mq6" path="res://core/photo_mode/photo_mode_controller.gd" id="1_uhpya"]
|
[ext_resource type="Script" uid="uid://d7ln6iru6mq6" path="res://core/photo_mode/runtime/photo_mode_controller.gd" id="1_uhpya"]
|
||||||
|
|
||||||
[node name="PhotoModeController" type="Node3D" unique_id=695158870]
|
[node name="PhotoModeController" type="Node3D" unique_id=695158870]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://bvw086glfpcba"]
|
[gd_scene format=3 uid="uid://bvw086glfpcba"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dq3qtcrdnikl7" path="res://core/photo_mode/collectible_gallery.gd" id="1_67tug"]
|
[ext_resource type="Script" uid="uid://dq3qtcrdnikl7" path="res://core/photo_mode/ui/collectible_gallery.gd" id="1_67tug"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dp7dvfauh5rpx" path="res://core/photo_mode/collectible_ui.tscn" id="2_or234"]
|
[ext_resource type="PackedScene" uid="uid://dp7dvfauh5rpx" path="res://core/photo_mode/ui/collectible_ui.tscn" id="2_or234"]
|
||||||
|
|
||||||
[node name="CollectibleGallery" type="Control" unique_id=354419843]
|
[node name="CollectibleGallery" type="Control" unique_id=354419843]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://dp7dvfauh5rpx"]
|
[gd_scene format=3 uid="uid://dp7dvfauh5rpx"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dxh8e1n16qjpp" path="res://core/photo_mode/collectible_ui.gd" id="1_tu5nx"]
|
[ext_resource type="Script" uid="uid://dxh8e1n16qjpp" path="res://core/photo_mode/ui/collectible_ui.gd" id="1_tu5nx"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cx8d233y32kmu" path="res://icon.svg" id="1_x3wje"]
|
[ext_resource type="Texture2D" uid="uid://cx8d233y32kmu" path="res://icon.svg" id="1_x3wje"]
|
||||||
|
|
||||||
[node name="CollectibleUI" type="Control" unique_id=201865221]
|
[node name="CollectibleUI" type="Control" unique_id=201865221]
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://cvus62qkop3qi"]
|
[gd_scene format=3 uid="uid://cvus62qkop3qi"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dsey5dvc11vpq" path="res://core/photo_mode/photo.gd" id="1_u0arp"]
|
[ext_resource type="Script" uid="uid://dsey5dvc11vpq" path="res://core/photo_mode/ui/photo.gd" id="1_u0arp"]
|
||||||
|
|
||||||
[node name="Photo" type="Control" unique_id=201865221]
|
[node name="Photo" type="Control" unique_id=201865221]
|
||||||
custom_minimum_size = Vector2(200, 200)
|
custom_minimum_size = Vector2(200, 200)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://b6r787sik5yil"]
|
[gd_scene format=3 uid="uid://b6r787sik5yil"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://k4iqrlkbjppl" path="res://core/photo_mode/photo_gallery.gd" id="1_bp5uf"]
|
[ext_resource type="Script" uid="uid://k4iqrlkbjppl" path="res://core/photo_mode/ui/photo_gallery.gd" id="1_bp5uf"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cvus62qkop3qi" path="res://core/photo_mode/photo.tscn" id="2_45wok"]
|
[ext_resource type="PackedScene" uid="uid://cvus62qkop3qi" path="res://core/photo_mode/ui/photo.tscn" id="2_45wok"]
|
||||||
|
|
||||||
[node name="PhotoGallery" type="Control" unique_id=354419843]
|
[node name="PhotoGallery" type="Control" unique_id=354419843]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -10,7 +10,6 @@ func _ready():
|
|||||||
|
|
||||||
func play_track(index: int = current_track_index):
|
func play_track(index: int = current_track_index):
|
||||||
if playlist.is_empty():
|
if playlist.is_empty():
|
||||||
push_warning("Playlist is empty")
|
|
||||||
return
|
return
|
||||||
|
|
||||||
current_track_index = posmod(index, playlist.size())
|
current_track_index = posmod(index, playlist.size())
|
||||||
|
|||||||
@@ -3,4 +3,5 @@
|
|||||||
[ext_resource type="Script" uid="uid://bwrgh6xlvhqch" path="res://core/radio/radio.gd" id="1_2akjj"]
|
[ext_resource type="Script" uid="uid://bwrgh6xlvhqch" path="res://core/radio/radio.gd" id="1_2akjj"]
|
||||||
|
|
||||||
[node name="Radio" type="AudioStreamPlayer" unique_id=1234112225]
|
[node name="Radio" type="AudioStreamPlayer" unique_id=1234112225]
|
||||||
|
bus = &"Music"
|
||||||
script = ExtResource("1_2akjj")
|
script = ExtResource("1_2akjj")
|
||||||
|
|||||||
15
default_bus_layout.tres
Normal file
15
default_bus_layout.tres
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="AudioBusLayout" format=3 uid="uid://cqvx62pwvvboj"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
bus/1/name = &"Music"
|
||||||
|
bus/1/solo = false
|
||||||
|
bus/1/mute = false
|
||||||
|
bus/1/bypass_fx = false
|
||||||
|
bus/1/volume_db = 0.0
|
||||||
|
bus/1/send = &"Master"
|
||||||
|
bus/2/name = &"SFX"
|
||||||
|
bus/2/solo = false
|
||||||
|
bus/2/mute = false
|
||||||
|
bus/2/bypass_fx = false
|
||||||
|
bus/2/volume_db = 0.0
|
||||||
|
bus/2/send = &"Master"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://dqvrhiqgkd3w1"]
|
[gd_scene format=3 uid="uid://dqvrhiqgkd3w1"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/ai_base/ai_base.tscn" id="1_tvd10"]
|
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_tvd10"]
|
||||||
|
|
||||||
[sub_resource type="NavigationMesh" id="NavigationMesh_optuv"]
|
[sub_resource type="NavigationMesh" id="NavigationMesh_optuv"]
|
||||||
vertices = PackedVector3Array(10.984741, 0.25012434, -1.0140381, 11.234741, 0.25012434, 0.23596191, 19.484741, 0.25012434, 0.23596191, 19.484741, 0.25012434, -19.514038, 9.234741, 0.25012434, -1.0140381, -19.515259, 0.25012434, -19.514038, -19.515259, 0.25012434, -0.014038086, 8.984741, 0.25012434, -0.014038086, 10.984741, 0.25012434, 1.2359619, 19.484741, 0.25012434, 19.235962, 9.234741, 0.25012434, 1.2359619, -19.515259, 0.25012434, 19.235962)
|
vertices = PackedVector3Array(10.984741, 0.25012434, -1.0140381, 11.234741, 0.25012434, 0.23596191, 19.484741, 0.25012434, 0.23596191, 19.484741, 0.25012434, -19.514038, 9.234741, 0.25012434, -1.0140381, -19.515259, 0.25012434, -19.514038, -19.515259, 0.25012434, -0.014038086, 8.984741, 0.25012434, -0.014038086, 10.984741, 0.25012434, 1.2359619, 19.484741, 0.25012434, 19.235962, 9.234741, 0.25012434, 1.2359619, -19.515259, 0.25012434, 19.235962)
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
[gd_scene format=3 uid="uid://bwc8slnbu7dmn"]
|
[gd_scene format=3 uid="uid://bwc8slnbu7dmn"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://vni5kjalum6d" path="res://core/photo_mode/photo_mode_controller.tscn" id="1_css17"]
|
[ext_resource type="PackedScene" uid="uid://vni5kjalum6d" path="res://core/photo_mode/runtime/photo_mode_controller.tscn" id="1_css17"]
|
||||||
[ext_resource type="Script" uid="uid://7oglx4br38d5" path="res://docs/museums/photo_mode/museum_photo_mode.gd" id="1_ynvi2"]
|
[ext_resource type="Script" uid="uid://7oglx4br38d5" path="res://docs/museums/photo_mode/museum_photo_mode.gd" id="1_ynvi2"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bmkxt6btcx8qr" path="res://core/photo_mode/collectible.tscn" id="2_48mla"]
|
[ext_resource type="PackedScene" uid="uid://bmkxt6btcx8qr" path="res://core/photo_mode/runtime/collectible.tscn" id="2_48mla"]
|
||||||
[ext_resource type="Script" uid="uid://bj34o0org55ei" path="res://core/photo_mode/collectible_resource.gd" id="3_hh1ka"]
|
[ext_resource type="Script" uid="uid://bj34o0org55ei" path="res://core/photo_mode/data/collectible_resource.gd" id="3_hh1ka"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c3grftlmap4q5" path="res://docs/museums/daynight/scenes/grain_test/leaf_test.png" id="4_fan5s"]
|
[ext_resource type="Texture2D" uid="uid://c3grftlmap4q5" path="res://docs/museums/daynight/scenes/grain_test/leaf_test.png" id="4_fan5s"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bvw086glfpcba" path="res://core/photo_mode/collectible_gallery.tscn" id="5_ws0fy"]
|
[ext_resource type="PackedScene" uid="uid://bvw086glfpcba" path="res://core/photo_mode/ui/collectible_gallery.tscn" id="5_ws0fy"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b6r787sik5yil" path="res://core/photo_mode/photo_gallery.tscn" id="7_fh4km"]
|
[ext_resource type="PackedScene" uid="uid://b6r787sik5yil" path="res://core/photo_mode/ui/photo_gallery.tscn" id="7_fh4km"]
|
||||||
|
|
||||||
[sub_resource type="Environment" id="Environment_48mla"]
|
[sub_resource type="Environment" id="Environment_48mla"]
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ extends Node3D
|
|||||||
|
|
||||||
@onready var radio: Radio = $%Radio
|
@onready var radio: Radio = $%Radio
|
||||||
@onready var button_pause_resume: Button = $%Button_Pause_Resume
|
@onready var button_pause_resume: Button = $%Button_Pause_Resume
|
||||||
|
@onready var settings_menu: SettingsMenu = $%SettingsMenu
|
||||||
|
|
||||||
func _on_button_play_pressed() -> void:
|
func _on_button_play_pressed() -> void:
|
||||||
if !radio.playing:
|
if !radio.playing:
|
||||||
@@ -28,3 +29,7 @@ func _on_button_next_pressed() -> void:
|
|||||||
|
|
||||||
func _on_button_previous_pressed() -> void:
|
func _on_button_previous_pressed() -> void:
|
||||||
radio.prev_track()
|
radio.prev_track()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_settings_menu_pressed() -> void:
|
||||||
|
settings_menu.visible = !settings_menu.visible
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://cpeyt1dgrtglc" path="res://core/radio/radio.tscn" id="1_8yomj"]
|
[ext_resource type="PackedScene" uid="uid://cpeyt1dgrtglc" path="res://core/radio/radio.tscn" id="1_8yomj"]
|
||||||
[ext_resource type="Script" uid="uid://ew4b78u5tkiu" path="res://docs/museums/radio/museum_radio.gd" id="1_h5r8c"]
|
[ext_resource type="Script" uid="uid://ew4b78u5tkiu" path="res://docs/museums/radio/museum_radio.gd" id="1_h5r8c"]
|
||||||
[ext_resource type="AudioStream" uid="uid://70cc8she43re" path="res://docs/museums/radio/lofi_01.ogg" id="3_ltpvc"]
|
[ext_resource type="AudioStream" uid="uid://70cc8she43re" path="res://docs/museums/radio/lofi_01.ogg" id="3_ltpvc"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://caqf471x0kttc" path="res://core/audio/settings/settings_menu.tscn" id="4_8pw2j"]
|
||||||
|
|
||||||
[node name="MuseumRadio" type="Node3D" unique_id=204859062]
|
[node name="MuseumRadio" type="Node3D" unique_id=204859062]
|
||||||
script = ExtResource("1_h5r8c")
|
script = ExtResource("1_h5r8c")
|
||||||
@@ -19,45 +20,59 @@ anchor_bottom = 1.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Control" unique_id=2097365775]
|
[node name="SettingsMenu" parent="Control" unique_id=1639777294 instance=ExtResource("4_8pw2j")]
|
||||||
layout_mode = 0
|
unique_name_in_owner = true
|
||||||
offset_left = 50.0
|
visible = false
|
||||||
offset_top = 50.0
|
layout_mode = 1
|
||||||
offset_right = 125.0
|
anchors_preset = 8
|
||||||
offset_bottom = 221.0
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
|
||||||
[node name="Button_Play" type="Button" parent="Control/VBoxContainer" unique_id=1422696340]
|
[node name="VBoxContainer2" type="VBoxContainer" parent="Control" unique_id=2092627240]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 9
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_right = 229.0
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="Control/VBoxContainer2" unique_id=2097365775]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Button_Play" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=1422696340]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Play"
|
text = "Play"
|
||||||
|
|
||||||
[node name="Button_Pause_Resume" type="Button" parent="Control/VBoxContainer" unique_id=2016690081]
|
[node name="Button_Pause_Resume" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=2016690081]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Pause"
|
text = "Pause"
|
||||||
|
|
||||||
[node name="Button_Stop" type="Button" parent="Control/VBoxContainer" unique_id=61861870]
|
[node name="Button_Stop" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=61861870]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Stop"
|
text = "Stop"
|
||||||
|
|
||||||
[node name="Button_Next" type="Button" parent="Control/VBoxContainer" unique_id=957606385]
|
[node name="Button_Next" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=957606385]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Next"
|
text = "Next"
|
||||||
|
|
||||||
[node name="Button_Previous" type="Button" parent="Control/VBoxContainer" unique_id=929072518]
|
[node name="Button_Previous" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=929072518]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Previous"
|
text = "Previous"
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="Control" unique_id=1558442050]
|
[node name="Button_SettingsMenu" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=431867154]
|
||||||
layout_mode = 0
|
layout_mode = 2
|
||||||
offset_left = 50.0
|
text = "SettingsMenu"
|
||||||
offset_top = 250.0
|
|
||||||
offset_right = 400.0
|
|
||||||
offset_bottom = 1027.0
|
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="Control/PanelContainer" unique_id=7789304]
|
[node name="PanelContainer" type="PanelContainer" parent="Control/VBoxContainer2" unique_id=1558442050]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="ScrollContainer" type="ScrollContainer" parent="Control/VBoxContainer2/PanelContainer" unique_id=7789304]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Control/PanelContainer/ScrollContainer" unique_id=2043293564]
|
[node name="Label" type="Label" parent="Control/VBoxContainer2/PanelContainer/ScrollContainer" unique_id=2043293564]
|
||||||
custom_minimum_size = Vector2(1, 1)
|
custom_minimum_size = Vector2(1, 1)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
@@ -81,8 +96,9 @@ Adjustable Parameters:
|
|||||||
- Current Track Index: Determines which song starts playing by default."
|
- Current Track Index: Determines which song starts playing by default."
|
||||||
autowrap_mode = 2
|
autowrap_mode = 2
|
||||||
|
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Play" to="." method="_on_button_play_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Play" to="." method="_on_button_play_pressed"]
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Pause_Resume" to="." method="_on_button_pause_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Pause_Resume" to="." method="_on_button_pause_pressed"]
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Stop" to="." method="_on_button_stop_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Stop" to="." method="_on_button_stop_pressed"]
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Next" to="." method="_on_button_next_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Next" to="." method="_on_button_next_pressed"]
|
||||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Previous" to="." method="_on_button_previous_pressed"]
|
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Previous" to="." method="_on_button_previous_pressed"]
|
||||||
|
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_SettingsMenu" to="." method="_on_button_settings_menu_pressed"]
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ config/icon="res://icon.svg"
|
|||||||
UIEvents="*uid://dehu28iq27mbn"
|
UIEvents="*uid://dehu28iq27mbn"
|
||||||
GameState="*uid://b17g2w2g101o6"
|
GameState="*uid://b17g2w2g101o6"
|
||||||
CollectionManager="*uid://c3kq1qddpm8tf"
|
CollectionManager="*uid://c3kq1qddpm8tf"
|
||||||
|
AudioManager="*uid://dcttbbavtwtsg"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user