222 lines
6.4 KiB
Text
222 lines
6.4 KiB
Text
[gd_scene load_steps=5 format=3 uid="uid://game_scene"]
|
|
|
|
[ext_resource type="Script" path="res://scripts/game/game_controller.gd" id="1_game"]
|
|
[ext_resource type="PackedScene" uid="uid://player_scene" path="res://scenes/player.tscn" id="2_player"]
|
|
[ext_resource type="Script" path="res://scripts/game/level_generator.gd" id="3_gen"]
|
|
[ext_resource type="Script" path="res://scripts/ui/game_ui.gd" id="4_ui"]
|
|
|
|
[node name="Game" type="Node2D"]
|
|
script = ExtResource("1_game")
|
|
|
|
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
|
|
|
|
[node name="Sky" type="ParallaxLayer" parent="ParallaxBackground"]
|
|
motion_scale = Vector2(0.1, 0.1)
|
|
|
|
[node name="ColorRect" type="ColorRect" parent="ParallaxBackground/Sky"]
|
|
offset_left = -100.0
|
|
offset_top = -100.0
|
|
offset_right = 2020.0
|
|
offset_bottom = 1180.0
|
|
color = Color(0.05, 0.02, 0.15, 1)
|
|
|
|
[node name="Buildings" type="ParallaxLayer" parent="ParallaxBackground"]
|
|
motion_scale = Vector2(0.3, 0.3)
|
|
|
|
[node name="FarBuildings" type="ParallaxLayer" parent="ParallaxBackground"]
|
|
motion_scale = Vector2(0.5, 0.5)
|
|
|
|
[node name="Ground" type="StaticBody2D" parent="."]
|
|
position = Vector2(960, 900)
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground"]
|
|
shape = SubResource("RectangleShape2D_ground")
|
|
|
|
[node name="GroundVisual" type="ColorRect" parent="Ground"]
|
|
offset_left = -1000.0
|
|
offset_top = -10.0
|
|
offset_right = 1000.0
|
|
offset_bottom = 200.0
|
|
color = Color(0.1, 0.05, 0.2, 1)
|
|
|
|
[node name="GroundLine" type="ColorRect" parent="Ground"]
|
|
offset_left = -1000.0
|
|
offset_top = -12.0
|
|
offset_right = 1000.0
|
|
offset_bottom = -8.0
|
|
color = Color(1, 0.2, 0.6, 1)
|
|
|
|
[node name="Player" parent="." instance=ExtResource("2_player")]
|
|
position = Vector2(300, 800)
|
|
|
|
[node name="LevelGenerator" type="Node2D" parent="."]
|
|
script = ExtResource("3_gen")
|
|
|
|
[node name="ObstacleContainer" type="Node2D" parent="LevelGenerator"]
|
|
|
|
[node name="CollectibleContainer" type="Node2D" parent="LevelGenerator"]
|
|
|
|
[node name="Camera2D" type="Camera2D" parent="."]
|
|
position = Vector2(960, 540)
|
|
|
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
|
|
|
[node name="GameUI" type="Control" parent="CanvasLayer"]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
script = ExtResource("4_ui")
|
|
|
|
[node name="ScoreLabel" type="Label" parent="CanvasLayer/GameUI"]
|
|
layout_mode = 1
|
|
anchors_preset = 1
|
|
anchor_left = 1.0
|
|
anchor_right = 1.0
|
|
offset_left = -200.0
|
|
offset_top = 20.0
|
|
offset_right = -20.0
|
|
offset_bottom = 60.0
|
|
grow_horizontal = 0
|
|
theme_override_colors/font_color = Color(0, 1, 1, 1)
|
|
theme_override_font_sizes/font_size = 32
|
|
text = "0"
|
|
horizontal_alignment = 2
|
|
|
|
[node name="MultiplierLabel" type="Label" parent="CanvasLayer/GameUI"]
|
|
layout_mode = 1
|
|
anchors_preset = 1
|
|
anchor_left = 1.0
|
|
anchor_right = 1.0
|
|
offset_left = -200.0
|
|
offset_top = 60.0
|
|
offset_right = -20.0
|
|
offset_bottom = 90.0
|
|
grow_horizontal = 0
|
|
theme_override_colors/font_color = Color(1, 0.8, 0, 1)
|
|
theme_override_font_sizes/font_size = 20
|
|
text = "x1.0"
|
|
horizontal_alignment = 2
|
|
|
|
[node name="PauseMenu" type="Control" parent="CanvasLayer/GameUI"]
|
|
visible = false
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
|
|
[node name="Overlay" type="ColorRect" parent="CanvasLayer/GameUI/PauseMenu"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
color = Color(0, 0, 0, 0.7)
|
|
|
|
[node name="VBox" type="VBoxContainer" parent="CanvasLayer/GameUI/PauseMenu"]
|
|
layout_mode = 1
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -150.0
|
|
offset_top = -100.0
|
|
offset_right = 150.0
|
|
offset_bottom = 100.0
|
|
theme_override_constants/separation = 20
|
|
|
|
[node name="PausedLabel" type="Label" parent="CanvasLayer/GameUI/PauseMenu/VBox"]
|
|
layout_mode = 2
|
|
theme_override_colors/font_color = Color(1, 0.2, 0.6, 1)
|
|
theme_override_font_sizes/font_size = 48
|
|
text = "PAUSED"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="ResumeButton" type="Button" parent="CanvasLayer/GameUI/PauseMenu/VBox"]
|
|
custom_minimum_size = Vector2(200, 50)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
text = "RESUME"
|
|
|
|
[node name="RestartButton" type="Button" parent="CanvasLayer/GameUI/PauseMenu/VBox"]
|
|
custom_minimum_size = Vector2(200, 50)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
text = "RESTART"
|
|
|
|
[node name="MenuButton" type="Button" parent="CanvasLayer/GameUI/PauseMenu/VBox"]
|
|
custom_minimum_size = Vector2(200, 50)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
text = "MAIN MENU"
|
|
|
|
[node name="GameOverMenu" type="Control" parent="CanvasLayer/GameUI"]
|
|
visible = false
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
|
|
[node name="Overlay" type="ColorRect" parent="CanvasLayer/GameUI/GameOverMenu"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
color = Color(0.1, 0, 0.05, 0.9)
|
|
|
|
[node name="VBox" type="VBoxContainer" parent="CanvasLayer/GameUI/GameOverMenu"]
|
|
layout_mode = 1
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -200.0
|
|
offset_top = -150.0
|
|
offset_right = 200.0
|
|
offset_bottom = 150.0
|
|
theme_override_constants/separation = 15
|
|
|
|
[node name="GameOverLabel" type="Label" parent="CanvasLayer/GameUI/GameOverMenu/VBox"]
|
|
layout_mode = 2
|
|
theme_override_colors/font_color = Color(1, 0.2, 0.6, 1)
|
|
theme_override_font_sizes/font_size = 56
|
|
text = "GAME OVER"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="FinalScoreLabel" type="Label" parent="CanvasLayer/GameUI/GameOverMenu/VBox"]
|
|
layout_mode = 2
|
|
theme_override_colors/font_color = Color(0, 1, 1, 1)
|
|
theme_override_font_sizes/font_size = 32
|
|
text = "SCORE: 0"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="HighScoreLabel" type="Label" parent="CanvasLayer/GameUI/GameOverMenu/VBox"]
|
|
layout_mode = 2
|
|
theme_override_colors/font_color = Color(1, 0.8, 0, 1)
|
|
theme_override_font_sizes/font_size = 24
|
|
text = "HIGH SCORE: 0"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="NewHighScore" type="Label" parent="CanvasLayer/GameUI/GameOverMenu/VBox"]
|
|
visible = false
|
|
layout_mode = 2
|
|
theme_override_colors/font_color = Color(1, 1, 0, 1)
|
|
theme_override_font_sizes/font_size = 20
|
|
text = "★ NEW HIGH SCORE! ★"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="RetryButton" type="Button" parent="CanvasLayer/GameUI/GameOverMenu/VBox"]
|
|
custom_minimum_size = Vector2(200, 50)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
text = "RETRY"
|
|
|
|
[node name="MenuButton" type="Button" parent="CanvasLayer/GameUI/GameOverMenu/VBox"]
|
|
custom_minimum_size = Vector2(200, 50)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
text = "MAIN MENU"
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ground"]
|
|
size = Vector2(4000, 20)
|