add falling block

This commit is contained in:
pennyrigate 2023-01-13 14:52:47 -05:00
parent d6547b61d4
commit 54f0880864
20 changed files with 153 additions and 26 deletions

View file

@ -0,0 +1,6 @@
extends Area2D
func _on_Area2D_area_entered(area):
#Kill player
if area.is_in_group("player"):
area.get_parent().die()

View file

@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://objects/environment/death tile/death_tile.gd" type="Script" id=1]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 4, 4 )
[node name="Area2D" type="Area2D"]
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 4, 4 )
shape = SubResource( 1 )
[connection signal="area_entered" from="." to="." method="_on_Area2D_area_entered"]