DuckRun/scenes/Main.tscn

457 lines
14 KiB
Text
Raw Normal View History

2024-10-03 21:12:20 +02:00
[gd_scene load_steps=30 format=3 uid="uid://bb5qp5868y5i"]
2024-10-01 15:56:30 +02:00
[ext_resource type="Script" path="res://code/main.gd" id="1_ar2ah"]
[ext_resource type="PackedScene" uid="uid://8v5mbbnddorh" path="res://scenes/Duck/Duck.tscn" id="2"]
[ext_resource type="Script" path="res://code/score.gd" id="2_4em51"]
[ext_resource type="FontFile" uid="uid://ddcous2vnc3ux" path="res://m5x7.ttf" id="2_m1hnc"]
[ext_resource type="Texture2D" uid="uid://dgfvf2ta4lc4e" path="res://assets/Ground/stars.png" id="2_ohf2r"]
[ext_resource type="Texture2D" uid="uid://bg78j6xxw3ck4" path="res://assets/Ground/background.png" id="3"]
[ext_resource type="Texture2D" uid="uid://bmklwmjrtynqo" path="res://assets/Ground/ground.png" id="3_vc02h"]
[ext_resource type="Script" path="res://scenes/hindernis/Spawner/hindernis_spawner.gd" id="4_oc6me"]
[ext_resource type="PackedScene" uid="uid://dm307sj4nenjt" path="res://scenes/schild.tscn" id="5_ewtcf"]
[ext_resource type="Texture2D" uid="uid://do0okfxenx2ci" path="res://assets/GUI/restart button.png" id="6_boo0r"]
[ext_resource type="Script" path="res://scenes/easteregg/Spawner/easteregg_spawner.gd" id="8_awkaj"]
[ext_resource type="Script" path="res://code/GUI/startschild.gd" id="10_tn1on"]
[ext_resource type="Texture2D" uid="uid://d2i2d0rmdtklc" path="res://assets/GUI/start button.png" id="11_4sha5"]
[ext_resource type="Script" path="res://scenes/Wolke/Spawner/wolken_spawner.gd" id="11_x2wm3"]
2024-10-03 21:12:20 +02:00
[ext_resource type="Texture2D" uid="uid://dqvnnd3o1eele" path="res://assets/GUI/settings button.png" id="13_0b7u8"]
2024-10-01 15:56:30 +02:00
[ext_resource type="Texture2D" uid="uid://bj7bgtdcbdald" path="res://assets/GUI/logo.png" id="14_4hepj"]
2024-10-03 21:12:20 +02:00
[ext_resource type="Texture2D" uid="uid://nvn254p6tk8j" path="res://assets/GUI/back button.png" id="15_wi7xd"]
[ext_resource type="Script" path="res://code/GUI/settingsschild.gd" id="16_0wi25"]
[ext_resource type="Texture2D" uid="uid://bf82voofmvdj4" path="res://assets/GUI/theme_slider/slider.png" id="17_41xdg"]
2024-10-01 15:56:30 +02:00
[sub_resource type="Animation" id="Animation_n8ktn"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:color:r")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0.560784, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:color:g")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
[sub_resource type="Animation" id="Animation_7cwe6"]
resource_name = "change_time"
length = 6.0
step = 0.25
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("..:modulate:r")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("..:modulate:g")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/2/type = "bezier"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("..:modulate:b")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/3/type = "bezier"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".:color:r")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.560784, -0.25, 0, 0.25, 0, 0.1, -0.5, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/4/type = "bezier"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath(".:color:g")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0, 0.1, -0.5, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/5/type = "bezier"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath(".:color:b")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0, 0.3, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/6/type = "bezier"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("../Background/Stars:modulate:a")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0, -0.25, 0, 1, 0, 1, -1, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_c30x0"]
_data = {
"RESET": SubResource("Animation_n8ktn"),
"change_time": SubResource("Animation_7cwe6")
}
[sub_resource type="GDScript" id="GDScript_rkc4w"]
script/source = "extends Timer
var day = true
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _change_time() -> void:
print(day)
if day:
$\"../AnimationPlayer\".play(\"change_time\")
day = not day
else:
$\"../AnimationPlayer\".play_backwards(\"change_time\")
day = not day
"
[sub_resource type="RectangleShape2D" id="RectangleShape2D_o05as"]
size = Vector2(4, 15)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0a3yj"]
size = Vector2(361, 8)
2024-10-03 21:12:20 +02:00
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jin1w"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g0rdc"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xb3tf"]
bg_color = Color(1, 0.50219, 0, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(1, 1, 1, 1)
corner_detail = 1
expand_margin_top = 1.0
expand_margin_bottom = 2.0
anti_aliasing = false
[sub_resource type="Theme" id="Theme_0130c"]
HSlider/icons/grabber = ExtResource("17_41xdg")
HSlider/icons/grabber_highlight = ExtResource("17_41xdg")
HSlider/styles/grabber_area = SubResource("StyleBoxEmpty_jin1w")
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxEmpty_g0rdc")
HSlider/styles/slider = SubResource("StyleBoxFlat_xb3tf")
2024-10-01 15:56:30 +02:00
[node name="Game" type="Node"]
script = ExtResource("1_ar2ah")
[node name="Screen" type="Node2D" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="Screen"]
root_node = NodePath("../BackgroundRect")
libraries = {
"": SubResource("AnimationLibrary_c30x0")
}
[node name="Day-NightTimer" type="Timer" parent="Screen"]
wait_time = 12.0
autostart = true
script = SubResource("GDScript_rkc4w")
[node name="BackgroundRect" type="ColorRect" parent="Screen"]
offset_right = 801.0
offset_bottom = 97.0
color = Color(0.560784, 0.937255, 0.937255, 1)
[node name="Background" type="Node2D" parent="Screen"]
[node name="Stars" type="Sprite2D" parent="Screen/Background"]
modulate = Color(1, 1, 1, 0)
position = Vector2(85, 50)
texture = ExtResource("2_ohf2r")
[node name="Sprites" type="Node2D" parent="Screen/Background"]
position = Vector2(79, 96)
[node name="Background" type="Sprite2D" parent="Screen/Background/Sprites"]
position = Vector2(21, -37)
texture = ExtResource("3")
[node name="Background2" type="Sprite2D" parent="Screen/Background/Sprites"]
position = Vector2(221, -37)
texture = ExtResource("3")
[node name="Background3" type="Sprite2D" parent="Screen/Background/Sprites"]
position = Vector2(421, -37)
texture = ExtResource("3")
[node name="Ground" type="Sprite2D" parent="Screen/Background/Sprites"]
position = Vector2(21, -2)
texture = ExtResource("3_vc02h")
[node name="Ground2" type="Sprite2D" parent="Screen/Background/Sprites"]
position = Vector2(221, -2)
texture = ExtResource("3_vc02h")
[node name="Ground3" type="Sprite2D" parent="Screen/Background/Sprites"]
position = Vector2(421, -2)
texture = ExtResource("3_vc02h")
[node name="Floor" type="StaticBody2D" parent="Screen/Background"]
[node name="EasterEggFixCollision" type="CollisionShape2D" parent="Screen/Background/Floor"]
position = Vector2(-2, 83.5)
shape = SubResource("RectangleShape2D_o05as")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Screen/Background/Floor"]
position = Vector2(101.5, 96)
shape = SubResource("RectangleShape2D_0a3yj")
[node name="HindernissSpawner" type="Marker2D" parent="Screen"]
position = Vector2(446, 92)
script = ExtResource("4_oc6me")
[node name="Duck" parent="Screen" instance=ExtResource("2")]
position = Vector2(21, 91)
[node name="WolkenSpawner" type="Marker2D" parent="Screen"]
position = Vector2(485, -1)
script = ExtResource("11_x2wm3")
[node name="LevelUpTimer" type="Timer" parent="Screen"]
wait_time = 5.0
[node name="SpawnTimer" type="Timer" parent="Screen"]
wait_time = 1.6
[node name="WolkenTimer" type="Timer" parent="Screen"]
autostart = true
[node name="EastereggSpawner" type="Marker2D" parent="Screen"]
position = Vector2(81, -18)
script = ExtResource("8_awkaj")
[node name="Gui" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="GameOverSchild" parent="Gui" instance=ExtResource("5_ewtcf")]
visible = false
2024-10-03 21:12:20 +02:00
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 0.5
offset_left = -53.0
offset_top = -69.0
offset_right = 47.0
offset_bottom = 81.0
grow_horizontal = 2
2024-10-01 15:56:30 +02:00
[node name="Restart" type="TextureButton" parent="Gui/GameOverSchild"]
texture_repeat = 2
2024-10-03 21:12:20 +02:00
layout_mode = 1
2024-10-01 15:56:30 +02:00
anchors_preset = -1
anchor_left = 0.5
2024-10-03 21:12:20 +02:00
anchor_top = 0.762
2024-10-01 15:56:30 +02:00
anchor_right = 0.5
2024-10-03 21:12:20 +02:00
anchor_bottom = 0.762
offset_left = -23.0
offset_top = -23.3
offset_right = -8.0
offset_bottom = -8.3
2024-10-01 15:56:30 +02:00
scale = Vector2(3, 3)
texture_normal = ExtResource("6_boo0r")
stretch_mode = 1
[node name="StartSchild" parent="Gui" instance=ExtResource("5_ewtcf")]
2024-10-03 21:12:20 +02:00
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -26.0
offset_top = -118.0
offset_right = 74.0
offset_bottom = 32.0
grow_horizontal = 2
grow_vertical = 2
2024-10-01 15:56:30 +02:00
script = ExtResource("10_tn1on")
[node name="Start" type="TextureButton" parent="Gui/StartSchild"]
texture_repeat = 2
2024-10-03 21:12:20 +02:00
layout_mode = 1
2024-10-01 15:56:30 +02:00
anchors_preset = -1
anchor_left = 0.5
2024-10-03 21:12:20 +02:00
anchor_top = 0.777
anchor_right = 0.505
anchor_bottom = 0.777
offset_left = -1.0
offset_top = -23.55
offset_right = 13.5
offset_bottom = -8.55
grow_horizontal = 2
grow_vertical = 2
2024-10-01 15:56:30 +02:00
scale = Vector2(3, 3)
texture_normal = ExtResource("11_4sha5")
stretch_mode = 1
2024-10-03 21:12:20 +02:00
[node name="Settings" type="TextureButton" parent="Gui/StartSchild"]
texture_repeat = 2
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.777
anchor_right = 0.505
anchor_bottom = 0.777
offset_left = -44.0
offset_top = -23.55
offset_right = -29.5
offset_bottom = -8.55
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(3, 3)
texture_normal = ExtResource("13_0b7u8")
stretch_mode = 1
2024-10-01 15:56:30 +02:00
[node name="Logo" type="TextureButton" parent="Gui/StartSchild"]
2024-10-03 21:12:20 +02:00
layout_mode = 1
2024-10-01 15:56:30 +02:00
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
2024-10-03 21:12:20 +02:00
offset_left = -92.0
offset_top = 111.0
offset_right = -64.0
offset_bottom = -10.0
2024-10-01 15:56:30 +02:00
grow_horizontal = 2
grow_vertical = 2
rotation = -0.397935
texture_normal = ExtResource("14_4hepj")
2024-10-03 21:12:20 +02:00
[node name="Settings" parent="Gui" instance=ExtResource("5_ewtcf")]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -26.0
offset_top = -118.0
offset_right = 74.0
offset_bottom = 32.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("16_0wi25")
[node name="BackButton" type="TextureButton" parent="Gui/Settings"]
layout_mode = 1
offset_left = 2.0
offset_top = 79.0
offset_right = 17.0
offset_bottom = 94.0
texture_normal = ExtResource("15_wi7xd")
[node name="ColorSlider" type="HSlider" parent="Gui/Settings"]
layout_mode = 1
anchors_preset = -1
anchor_right = 0.699
anchor_bottom = 0.5
offset_left = 34.0
offset_top = 93.0
offset_right = 22.1
offset_bottom = 34.0
theme = SubResource("Theme_0130c")
value = 16.0
[node name="ColorLabel" type="Label" parent="Gui/Settings"]
layout_mode = 0
offset_left = 4.0
offset_top = 93.0
offset_right = 44.0
offset_bottom = 116.0
theme_override_fonts/font = ExtResource("2_m1hnc")
text = "Farbe"
2024-10-01 15:56:30 +02:00
[node name="Score" type="Label" parent="Gui"]
layout_mode = 1
anchors_preset = 13
anchor_left = 0.5
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -0.5
offset_top = 12.0
offset_right = 0.5
offset_bottom = 12.0
grow_horizontal = 2
grow_vertical = 2
theme_override_fonts/font = ExtResource("2_m1hnc")
text = "
"
script = ExtResource("2_4em51")
[node name="ScoreCounter" type="Timer" parent="Gui/Score"]
wait_time = 0.1
autostart = true
[connection signal="timeout" from="Screen/Day-NightTimer" to="Screen/Day-NightTimer" method="_change_time"]
[connection signal="gameover" from="Screen/Duck" to="Gui/GameOverSchild" method="_on_duck_gameover"]
[connection signal="timeout" from="Screen/LevelUpTimer" to="." method="_on_level_up_timer_timeout"]
[connection signal="timeout" from="Screen/SpawnTimer" to="Screen/HindernissSpawner" method="_spawn"]
[connection signal="timeout" from="Screen/WolkenTimer" to="Screen/WolkenSpawner" method="_spawn"]
[connection signal="pressed" from="Gui/GameOverSchild/Restart" to="Gui/GameOverSchild" method="_on_restart_pressed"]
[connection signal="pressed" from="Gui/StartSchild/Start" to="Gui/StartSchild" method="_on_start_pressed"]
2024-10-03 21:12:20 +02:00
[connection signal="pressed" from="Gui/StartSchild/Settings" to="Gui/StartSchild" method="_on_settings_pressed"]
2024-10-01 15:56:30 +02:00
[connection signal="pressed" from="Gui/StartSchild/Logo" to="Screen/EastereggSpawner" method="_spawn"]
2024-10-03 21:12:20 +02:00
[connection signal="pressed" from="Gui/Settings/BackButton" to="Gui/Settings" method="_on_back_pressed"]
[connection signal="value_changed" from="Gui/Settings/ColorSlider" to="Screen/Duck" method="_color_slider_changed"]
2024-10-01 15:56:30 +02:00
[connection signal="timeout" from="Gui/Score/ScoreCounter" to="." method="_score"]