level select menu
This commit is contained in:
+2
-1
@@ -12,7 +12,7 @@ config_version=5
|
|||||||
|
|
||||||
config/name="RetroMario"
|
config/name="RetroMario"
|
||||||
config/version="0.1"
|
config/version="0.1"
|
||||||
run/main_scene="res://scenes/levels/level_1.tscn"
|
run/main_scene="res://scenes/levels/level_0.tscn"
|
||||||
config/features=PackedStringArray("4.2", "Forward Plus")
|
config/features=PackedStringArray("4.2", "Forward Plus")
|
||||||
boot_splash/show_image=false
|
boot_splash/show_image=false
|
||||||
config/icon="res://assets/icon.png"
|
config/icon="res://assets/icon.png"
|
||||||
@@ -81,3 +81,4 @@ pointing/emulate_mouse_from_touch=false
|
|||||||
|
|
||||||
textures/canvas_textures/default_texture_filter=0
|
textures/canvas_textures/default_texture_filter=0
|
||||||
textures/vram_compression/import_etc2_astc=true
|
textures/vram_compression/import_etc2_astc=true
|
||||||
|
environment/defaults/default_clear_color=Color(1, 1, 1, 1)
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://drbqiko4xx71d"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/LevelSelect.gd" id="1_ck5bd"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://cpwx7datjer6s" path="res://assets/PixelOperator8.ttf" id="2_3ebbo"]
|
||||||
|
|
||||||
|
[node name="LevelSelect" type="CanvasLayer"]
|
||||||
|
script = ExtResource("1_ck5bd")
|
||||||
|
|
||||||
|
[node name="Control" 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="Button_1" type="Button" parent="Control"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -288.0
|
||||||
|
offset_top = -36.0
|
||||||
|
offset_right = -80.0
|
||||||
|
offset_bottom = 28.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_fonts/font = ExtResource("2_3ebbo")
|
||||||
|
theme_override_font_sizes/font_size = 24
|
||||||
|
text = "Level 1"
|
||||||
|
|
||||||
|
[node name="Button_2" type="Button" parent="Control"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = 80.0
|
||||||
|
offset_top = -36.0
|
||||||
|
offset_right = 288.0
|
||||||
|
offset_bottom = 28.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_fonts/font = ExtResource("2_3ebbo")
|
||||||
|
theme_override_font_sizes/font_size = 24
|
||||||
|
text = "Level 2"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="Control/Button_1" to="." method="_on_button_pressed" binds= ["1"]]
|
||||||
|
[connection signal="pressed" from="Control/Button_2" to="." method="_on_button_pressed" binds= ["2"]]
|
||||||
@@ -19421,7 +19421,7 @@ theme_override_font_sizes/font_size = 32
|
|||||||
text = "120"
|
text = "120"
|
||||||
|
|
||||||
[node name="Flag" parent="." instance=ExtResource("14_ry537")]
|
[node name="Flag" parent="." instance=ExtResource("14_ry537")]
|
||||||
load_level = "level_2"
|
load_level = "level_0"
|
||||||
|
|
||||||
[node name="StaticBody2D" parent="." instance=ExtResource("15_ac2kk")]
|
[node name="StaticBody2D" parent="." instance=ExtResource("15_ac2kk")]
|
||||||
position = Vector2(1040, 0)
|
position = Vector2(1040, 0)
|
||||||
|
|||||||
@@ -45817,7 +45817,7 @@ position = Vector2(2400, 0)
|
|||||||
|
|
||||||
[node name="Flag" parent="." instance=ExtResource("15_n64v8")]
|
[node name="Flag" parent="." instance=ExtResource("15_n64v8")]
|
||||||
position = Vector2(216, -679)
|
position = Vector2(216, -679)
|
||||||
load_level = "level_1"
|
load_level = "level_0"
|
||||||
|
|
||||||
[connection signal="body_entered" from="WorldBoundDown" to="WorldBoundDown" method="_on_body_entered"]
|
[connection signal="body_entered" from="WorldBoundDown" to="WorldBoundDown" method="_on_body_entered"]
|
||||||
[connection signal="timeout" from="WorldBoundDown/Timer" to="WorldBoundDown" method="_on_timer_timeout"]
|
[connection signal="timeout" from="WorldBoundDown/Timer" to="WorldBoundDown" method="_on_timer_timeout"]
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
extends CanvasLayer
|
||||||
|
|
||||||
|
|
||||||
|
# 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_button_pressed(extra_arg_0):
|
||||||
|
get_tree().change_scene_to_file("res://scenes/levels/level_"+ extra_arg_0 +".tscn")
|
||||||
Reference in New Issue
Block a user