From 9a891fe994c8a1f2440efa4289813f641217a234 Mon Sep 17 00:00:00 2001 From: Ruslan Ignatov Date: Fri, 3 Jul 2026 22:56:10 +0300 Subject: [PATCH] Added controller warning --- game/managers/sound_manager.gd | 2 ++ game/managers/sound_manager.tscn | 2 ++ game/menu/controller_splash.gd | 19 +++++++++++++ game/menu/controller_splash.gd.uid | 1 + game/menu/controller_splash.tscn | 34 ++++++++++++++++++++++++ project.godot | 2 +- sound/ui/best_with_controller.wav | 3 +++ sound/ui/best_with_controller.wav.import | 24 +++++++++++++++++ 8 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 game/menu/controller_splash.gd create mode 100644 game/menu/controller_splash.gd.uid create mode 100644 game/menu/controller_splash.tscn create mode 100644 sound/ui/best_with_controller.wav create mode 100644 sound/ui/best_with_controller.wav.import diff --git a/game/managers/sound_manager.gd b/game/managers/sound_manager.gd index f3f1cb1..707611f 100644 --- a/game/managers/sound_manager.gd +++ b/game/managers/sound_manager.gd @@ -20,10 +20,12 @@ const MUSIC_BUS = "Music" @export_group("UI Streams", "ui_stream") @export var ui_stream_accept : AudioStream +@export var ui_stream_best_with_controller : AudioStream @export var ui_stream_decline : AudioStream @export var ui_stream_select : AudioStream @export_group("SFX Streams", "sfx_stream") + @export var sfx_stream_congratulations : AudioStream @export var sfx_stream_corruption : AudioStream @export var sfx_stream_danger : AudioStream diff --git a/game/managers/sound_manager.tscn b/game/managers/sound_manager.tscn index 519d9f1..eb587c3 100644 --- a/game/managers/sound_manager.tscn +++ b/game/managers/sound_manager.tscn @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://dh2awtco3curi" path="res://game/managers/sound_manager.gd" id="1_cg0sy"] [ext_resource type="AudioStream" uid="uid://cwmibbhy2fpq2" path="res://sound/ui/accept.wav" id="2_ge1il"] +[ext_resource type="AudioStream" uid="uid://bh6ukmdbt5jw8" path="res://sound/ui/best_with_controller.wav" id="3_3d1ws"] [ext_resource type="AudioStream" uid="uid://d2tsomsqmhf0h" path="res://sound/ui/decline.wav" id="3_agyxs"] [ext_resource type="AudioStream" uid="uid://cfb2adf5hft7b" path="res://sound/ui/select.wav" id="4_0i6kl"] [ext_resource type="AudioStream" uid="uid://duahboiexw0ic" path="res://sound/sfx/congratulations.wav" id="5_13qx5"] @@ -30,6 +31,7 @@ pitch_sfx_max = 1.05 player_count_ui = 8 player_count_sfx = 32 ui_stream_accept = ExtResource("2_ge1il") +ui_stream_best_with_controller = ExtResource("3_3d1ws") ui_stream_decline = ExtResource("3_agyxs") ui_stream_select = ExtResource("4_0i6kl") sfx_stream_congratulations = ExtResource("5_13qx5") diff --git a/game/menu/controller_splash.gd b/game/menu/controller_splash.gd new file mode 100644 index 0000000..0b6a6f8 --- /dev/null +++ b/game/menu/controller_splash.gd @@ -0,0 +1,19 @@ +class_name ControllerSplash +extends Control + + +func _ready() -> void: + SoundManager.play_ui_stream(SoundManager.ui_stream_best_with_controller) + + var label : Label = $Label + var _opacity_tween := create_tween() + _opacity_tween.tween_property(label, "modulate:a", 0.0, 0.0) + _opacity_tween.tween_property(label, "modulate:a", 1.0, 1.0) + _opacity_tween.tween_property(label, "modulate:a", 1.0, 1.0) + _opacity_tween.tween_property(label, "modulate:a", 0.0, 1.0) + _opacity_tween.tween_property(label, "modulate:a", 0.0, 0.1) + + await _opacity_tween.finished + + get_tree().change_scene_to_file("res://game/menu/main_menu.tscn") + diff --git a/game/menu/controller_splash.gd.uid b/game/menu/controller_splash.gd.uid new file mode 100644 index 0000000..7f0080f --- /dev/null +++ b/game/menu/controller_splash.gd.uid @@ -0,0 +1 @@ +uid://b0cr7wxlu83mw diff --git a/game/menu/controller_splash.tscn b/game/menu/controller_splash.tscn new file mode 100644 index 0000000..32359d9 --- /dev/null +++ b/game/menu/controller_splash.tscn @@ -0,0 +1,34 @@ +[gd_scene format=3 uid="uid://b6qsnwora82c7"] + +[ext_resource type="Script" uid="uid://b0cr7wxlu83mw" path="res://game/menu/controller_splash.gd" id="1_vb85k"] +[ext_resource type="Theme" uid="uid://bqj884yfvhhft" path="res://game/themes/main_menu.tres" id="1_yb6jc"] + +[node name="ControllerSplash" type="Control" unique_id=696254260] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("1_yb6jc") +script = ExtResource("1_vb85k") + +[node name="ColorRect" type="ColorRect" parent="." unique_id=103592670] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.19607843, 0.19215687, 0.23137255, 1) + +[node name="Label" type="Label" parent="." unique_id=1222018571] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "BEST PLAYED WITH A CONTROLLER" +horizontal_alignment = 1 +vertical_alignment = 1 diff --git a/project.godot b/project.godot index 0b3db20..a23ee4a 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="NeonCollapse" -run/main_scene="uid://cl0h2acqcq5wq" +run/main_scene="uid://b6qsnwora82c7" config/features=PackedStringArray("4.7", "GL Compatibility") run/max_fps=240 boot_splash/show_image=false diff --git a/sound/ui/best_with_controller.wav b/sound/ui/best_with_controller.wav new file mode 100644 index 0000000..a406037 --- /dev/null +++ b/sound/ui/best_with_controller.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17ae7b68de0e2e1df1ca8e6a61a114bdd44e6592fad4b308b4b75a8a7a90eb31 +size 265576 diff --git a/sound/ui/best_with_controller.wav.import b/sound/ui/best_with_controller.wav.import new file mode 100644 index 0000000..baea756 --- /dev/null +++ b/sound/ui/best_with_controller.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bh6ukmdbt5jw8" +path="res://.godot/imported/best_with_controller.wav-cc962472a83c4856241a4cdcde157eb4.sample" + +[deps] + +source_file="res://sound/ui/best_with_controller.wav" +dest_files=["res://.godot/imported/best_with_controller.wav-cc962472a83c4856241a4cdcde157eb4.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2