Optimized scene tree and debugged some area detection
This commit is contained in:
36
Enemies/Snowman Enemy Blue.tscn
Normal file
36
Enemies/Snowman Enemy Blue.tscn
Normal file
@@ -0,0 +1,36 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Enemies/blue_snowman.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Enemies/Snowman Enemy.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 6.0
|
||||
height = 5.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
radius = 58.0175
|
||||
|
||||
[node name="snowmen_enemy" type="KinematicBody2D"]
|
||||
collision_layer = 2
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0.556812, 0.44545 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="detection" type="Area2D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
|
||||
[node name="detection" type="CollisionShape2D" parent="detection"]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
autostart = true
|
||||
|
||||
[connection signal="body_entered" from="detection" to="." method="_on_Area2D_body_entered"]
|
||||
[connection signal="body_exited" from="detection" to="." method="_on_Area2D_body_exited"]
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
Reference in New Issue
Block a user