mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
Auto stash before merge of "main" and "origin/main"
This commit is contained in:
25
menu/MainMenu.gd
Normal file
25
menu/MainMenu.gd
Normal file
@@ -0,0 +1,25 @@
|
||||
extends Control
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
$VBoxContainer/Start.grab_focus() # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
|
||||
|
||||
func _on_start_pressed():
|
||||
get_tree().change_scene("res://pathTo/Level.tscn") # Replace with function body.
|
||||
|
||||
|
||||
func _on_tutorial_pressed():
|
||||
get_tree().change_scene("res://pathTo/Level.tscn") # Replace with function body.
|
||||
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
17
menu/VBoxContainer.gd
Normal file
17
menu/VBoxContainer.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends VBoxContainer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_up_pressed():
|
||||
pass
|
||||
#InputHelper.set_action_key(action: String, key: String, swap_if_taken: bool = true) -> void
|
||||
#Replace with function body.
|
||||
21
menu/VolSlider.gd
Normal file
21
menu/VolSlider.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
extends HSlider
|
||||
|
||||
|
||||
var master_bus = AudioServer.get_bus_index("Master")
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_value_changed(value):
|
||||
AudioServer.set_bus_volume_db(master_bus, value)
|
||||
if value == -30:
|
||||
AudioServer.set_bus_mute(master_bus, true)
|
||||
else:
|
||||
AudioServer.set_bus_mute(master_bus,false) # Replace with function body.
|
||||
20
menu/VolumeSlider.gd
Normal file
20
menu/VolumeSlider.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends HSlider
|
||||
|
||||
var master_bus = AudioServer.get_bus_index("Master")
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_value_changed(value):
|
||||
AudioServer.set_bus_volume_db(master_bus, value)
|
||||
if value == -30:
|
||||
AudioServer.set_bus_mute(master_bus, true)
|
||||
else:
|
||||
AudioServer.set_bus_mute(master_bus,false) # Replace with function body.
|
||||
36
menu/credits_screen.tscn
Normal file
36
menu/credits_screen.tscn
Normal file
@@ -0,0 +1,36 @@
|
||||
[gd_scene format=3 uid="uid://c301ttbip7xm4"]
|
||||
|
||||
[node name="CreditsScreen" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
color = Color(0.0784314, 0.243137, 0.552941, 1)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Lukas
|
||||
Jonas
|
||||
Arthur
|
||||
Lena
|
||||
Albion
|
||||
..."
|
||||
66
menu/main_menu.tscn
Normal file
66
menu/main_menu.tscn
Normal file
@@ -0,0 +1,66 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bad6he0psvv6c"]
|
||||
|
||||
[ext_resource type="Script" path="res://menu/MainMenu.gd" id="1_hyw8p"]
|
||||
[ext_resource type="Script" path="res://menu/VolSlider.gd" id="2_h85ei"]
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_hyw8p")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.513726, 0.403922, 0.27451, 1)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -28.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 28.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Start" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Start
|
||||
"
|
||||
|
||||
[node name="Tutorial" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Tutorial
|
||||
"
|
||||
|
||||
[node name="Settings" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Volume:"
|
||||
|
||||
[node name="VolSlider" type="HSlider" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
min_value = -30.0
|
||||
max_value = 0.0
|
||||
script = ExtResource("2_h85ei")
|
||||
|
||||
[node name="Quit" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/Start" to="." method="_on_start_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Tutorial" to="." method="_on_tutorial_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Settings" to="." method="_on_settings_pressed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/VolSlider" to="VBoxContainer/VolSlider" method="_on_value_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Quit" to="." method="_on_quit_pressed"]
|
||||
Reference in New Issue
Block a user