summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Enemies/Enemy.tscn
blob: f78d0e54f66b483d0911bb301e5f9cc91f9d67fb (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[gd_scene load_steps=9 format=3 uid="uid://dgyk1sged38ct"]

[ext_resource type="Script" path="res://Scenes/Entities/Enemies/Enemy.gd" id="1_k16kd"]
[ext_resource type="Texture2D" uid="uid://5dk0c1kpvdgs" path="res://Assets/bomb_party_v4.png" id="2_cjc2s"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_gw5gm"]
size = Vector2(11, 11.5)

[sub_resource type="AtlasTexture" id="AtlasTexture_t7fm8"]
atlas = ExtResource("2_cjc2s")
region = Rect2(16, 224, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_pyhot"]
atlas = ExtResource("2_cjc2s")
region = Rect2(64, 224, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_aj58r"]
atlas = ExtResource("2_cjc2s")
region = Rect2(64, 224, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_spvfr"]
atlas = ExtResource("2_cjc2s")
region = Rect2(0, 224, 16, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_t5cld"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_t7fm8")
}],
"loop": true,
"name": &"down",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_pyhot")
}],
"loop": true,
"name": &"left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_aj58r")
}],
"loop": true,
"name": &"right",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_spvfr")
}],
"loop": true,
"name": &"up",
"speed": 5.0
}]

[node name="Enemy" type="CharacterBody2D"]
collision_layer = 16
collision_mask = 62
script = ExtResource("1_k16kd")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0.5, -0.25)
shape = SubResource("RectangleShape2D_gw5gm")
metadata/_edit_lock_ = true

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_t5cld")
animation = &"down"

[node name="Label" type="Label" parent="."]
offset_left = -5.0
offset_top = -20.0
offset_right = 16.0
offset_bottom = 6.0
scale = Vector2(0.5, 0.5)
text = "hp"

[node name="MovementTimer" type="Timer" parent="."]
wait_time = 3.0
autostart = true

[node name="InvincibilityTimer" type="Timer" parent="."]
wait_time = 1.5
one_shot = true

[connection signal="timeout" from="MovementTimer" to="." method="_on_movement_timer_timeout"]
[connection signal="timeout" from="InvincibilityTimer" to="." method="_on_invincibility_timer_timeout"]