-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenemy.tscn
37 lines (28 loc) · 1.14 KB
/
enemy.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[gd_scene load_steps=4 format=3 uid="uid://b6fxk82463p0m"]
[ext_resource type="Script" path="res://enemy.gd" id="1_8xudt"]
[ext_resource type="PackedScene" uid="uid://cqtv3ofgqk6id" path="res://assets/enemy.ase" id="1_xx2nv"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1b2yx"]
size = Vector2(12, 22)
[node name="Enemy" type="CharacterBody2D"]
collision_layer = 2
collision_mask = 0
motion_mode = 1
script = ExtResource("1_8xudt")
[node name="AnimatedSprite2D" parent="." instance=ExtResource("1_xx2nv")]
position = Vector2(-1, -6)
animation = &"Run"
autoplay = "Run"
frame_progress = 0.163175
[node name="PlayerRaycast" type="RayCast2D" parent="."]
target_position = Vector2(220, 0)
collision_mask = 3
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
debug_enabled = true
debug_use_custom = true
[node name="NavigationTimer" type="Timer" parent="."]
wait_time = 0.2
autostart = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -1)
shape = SubResource("RectangleShape2D_1b2yx")
[connection signal="timeout" from="NavigationTimer" to="." method="_on_navigation_timer_timeout"]