Changing levels
I made it where if you beat phonephreak it moves you to the next level.
This commit is contained in:
1 parent
7ffc756b36
commit
61912a7df4
11 files changed
+95
-26
No files matched your search
@@ -0,0 +1,11 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
# 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:
|
||||
GloblaData.doing_puzzle = false
|
||||
@@ -0,0 +1 @@
|
||||
uid://c0kr0eqjtde28
|
||||
@@ -0,0 +1,26 @@
|
||||
[gd_scene format=3 uid="uid://b6tcpqx0h3qpy"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cmtdq6tedv1mm" path="res://scenes/player.tscn" id="1_3bmlt"]
|
||||
[ext_resource type="Script" uid="uid://c0kr0eqjtde28" path="res://scenes/level_2.gd" id="1_jm1iu"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||
size = Vector2(2007, 149)
|
||||
|
||||
[node name="level2" type="Node2D" unique_id=1987596250]
|
||||
script = ExtResource("1_jm1iu")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=426446834]
|
||||
offset_left = 8.0
|
||||
offset_top = 865.0
|
||||
offset_right = 2003.0
|
||||
offset_bottom = 989.0
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=471962104]
|
||||
collision_layer = 2
|
||||
collision_mask = 5
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=1096663356]
|
||||
position = Vector2(1010, 942)
|
||||
shape = SubResource("RectangleShape2D_aqe1g")
|
||||
|
||||
[node name="player" parent="." unique_id=1596338883 instance=ExtResource("1_3bmlt")]
|
||||
@@ -6,7 +6,8 @@ extends Node2D
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
if GloblaData.doing_puzzle == true:
|
||||
$player.global_position = $Marker2D2.global_position
|
||||
|
||||
|
||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
[ext_resource type="Script" uid="uid://c7fhd1eqlgwr4" path="res://scripts/Phonephreak.gd" id="1_knn0u"]
|
||||
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="2_bg4gc"]
|
||||
[ext_resource type="Texture2D" uid="uid://hbkkhhlechol" path="res://assets/sprites/phonephreak.png" id="3_ba2os"]
|
||||
[ext_resource type="FontFile" uid="uid://ddm6ojsaiq20b" path="res://assets/fonts/PixelOperator8-Bold.ttf" id="4_35g6u"]
|
||||
|
||||
[node name="Phonephreak" type="Node2D" unique_id=1830177910]
|
||||
position = Vector2(0, 1)
|
||||
script = ExtResource("1_knn0u")
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." unique_id=519900134]
|
||||
@@ -40,3 +40,13 @@ offset_right = 49.0
|
||||
offset_bottom = 50.0
|
||||
mouse_filter = 2
|
||||
color = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1513678322]
|
||||
visible = false
|
||||
offset_left = 18.0
|
||||
offset_top = 298.0
|
||||
offset_right = 606.0
|
||||
offset_bottom = 399.0
|
||||
theme_override_fonts/font = ExtResource("4_35g6u")
|
||||
theme_override_font_sizes/font_size = 100
|
||||
text = "WRONG!"
|
||||
@@ -0,0 +1,15 @@
|
||||
extends Control
|
||||
|
||||
|
||||
# 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 _on_button_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/levels/level%s.tscn" % GloblaData.level)
|
||||
@@ -0,0 +1 @@
|
||||
uid://dcbdrv8y15dtu
|
||||
+14
-10
@@ -1,6 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://btktv5aqpafau"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="1_4ignj"]
|
||||
[ext_resource type="Script" uid="uid://dcbdrv8y15dtu" path="res://scenes/title.gd" id="1_wosw1"]
|
||||
|
||||
[node name="Title" type="Control" unique_id=715100706]
|
||||
layout_mode = 3
|
||||
@@ -9,29 +10,32 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_wosw1")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1504521213]
|
||||
layout_mode = 0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 648.0
|
||||
offset_right = 2013.0
|
||||
offset_bottom = 1007.0
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1433094765]
|
||||
layout_mode = 0
|
||||
offset_left = 107.0
|
||||
offset_top = 50.0
|
||||
offset_right = 1013.0
|
||||
offset_bottom = 301.0
|
||||
offset_left = 491.0
|
||||
offset_top = 83.0
|
||||
offset_right = 1397.0
|
||||
offset_bottom = 334.0
|
||||
theme_override_fonts/font = ExtResource("1_4ignj")
|
||||
theme_override_font_sizes/font_size = 250
|
||||
text = "title"
|
||||
|
||||
[node name="Button" type="Button" parent="." unique_id=963162220]
|
||||
layout_mode = 0
|
||||
offset_left = 149.0
|
||||
offset_top = 375.0
|
||||
offset_right = 982.0
|
||||
offset_bottom = 583.0
|
||||
offset_left = 556.0
|
||||
offset_top = 536.0
|
||||
offset_right = 1389.0
|
||||
offset_bottom = 744.0
|
||||
theme_override_fonts/font = ExtResource("1_4ignj")
|
||||
theme_override_font_sizes/font_size = 150
|
||||
text = "start"
|
||||
|
||||
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
||||
Reference in new issue
Block a user