it just werks

This commit is contained in:
pennyrigate 2025-03-02 18:02:05 -05:00
parent 1311e18f1f
commit 7e26433676
50 changed files with 1181 additions and 11 deletions

View file

@ -0,0 +1,18 @@
extends Node2D
@export var next_map:PackedScene
# 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_area_2d_body_entered(body: Node2D) -> void:
if body is Player:
SceneManager.current_scene = next_map.instantiate()
SceneManager.win_sound.play()

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=3 uid="uid://bhnse651bcybm"]
[ext_resource type="Texture2D" uid="uid://bwq21el575t1g" path="res://assets/textures/door/door.png" id="1_4beu0"]
[ext_resource type="Script" path="res://objects/end_door/end_door.gd" id="1_ph88k"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qkffx"]
size = Vector2(16, 16)
[node name="EndDoor" type="Node2D"]
script = ExtResource("1_ph88k")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_4beu0")
[node name="Area2D" type="Area2D" parent="."]
collision_mask = 16
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("RectangleShape2D_qkffx")
debug_color = Color(0, 1, 0.701961, 0.419608)
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]