Alternative way to place tovers and enemies
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cc5j50rtwlfld"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cc5j50rtwlfld"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3gn70ilm20tw" path="res://Game/Traps/traps.gd" id="1_3ht3o"]
|
||||
[ext_resource type="Texture2D" uid="uid://ri5c5u8gbjde" path="res://Assets/Traps/Wall/Tile2_49.png" id="1_y07rg"]
|
||||
@ -24,6 +24,9 @@ corner_radius_bottom_left = 20
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3ht3o"]
|
||||
size = Vector2(38, 59)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_xk2lx"]
|
||||
size = Vector2(20, 59)
|
||||
|
||||
[node name="Wall" type="Node2D"]
|
||||
script = ExtResource("1_3ht3o")
|
||||
|
||||
@ -40,7 +43,7 @@ position = Vector2(2.38419e-07, -0.999999)
|
||||
scale = Vector2(0.8, 0.8)
|
||||
shape = SubResource("RectangleShape2D_bxxpj")
|
||||
|
||||
[node name="Tile257" type="Sprite2D" parent="CharacterBody2D"]
|
||||
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
|
||||
position = Vector2(3, 13)
|
||||
scale = Vector2(1, 0.923)
|
||||
texture = ExtResource("2_3ht3o")
|
||||
@ -65,6 +68,13 @@ shape = SubResource("RectangleShape2D_3ht3o")
|
||||
[node name="Timer" type="Timer" parent="CharacterBody2D"]
|
||||
wait_time = 0.3
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2(0, -1.5)
|
||||
shape = SubResource("RectangleShape2D_xk2lx")
|
||||
debug_color = Color(0.811824, 0.00210331, 0.983083, 0.42)
|
||||
|
||||
[connection signal="body_shape_entered" from="CharacterBody2D/Area2D" to="." method="_on_area_2d_body_shape_entered"]
|
||||
[connection signal="body_shape_exited" from="CharacterBody2D/Area2D" to="." method="_on_area_2d_body_shape_exited"]
|
||||
[connection signal="timeout" from="CharacterBody2D/Timer" to="." method="_on_timer_timeout"]
|
||||
|
Reference in New Issue
Block a user