-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnemy.tscn
65 lines (51 loc) · 1.62 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
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
[gd_scene load_steps=10 format=2]
[ext_resource path="res://sprites/characters.png" type="Texture" id=1]
[ext_resource path="res://scenes/Enemy.gd" type="Script" id=2]
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 1 )
region = Rect2( 704, 64, 32, 32 )
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 64, 32, 32 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 32, 64, 32, 32 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 64, 64, 32, 32 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 96, 64, 32, 32 )
[sub_resource type="SpriteFrames" id=5]
animations = [ {
"frames": [ SubResource( 7 ) ],
"loop": false,
"name": "dead",
"speed": 0.0
}, {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
"loop": true,
"name": "walk",
"speed": 5.0
} ]
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 9, 11.5 )
[node name="Enemy" type="KinematicBody2D" groups=["enemy"]]
script = ExtResource( 2 )
__meta__ = {
"_edit_group_": true
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 5 )
animation = "walk"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -1, 4.5 )
shape = SubResource( 6 )
[node name="RayCast2D" type="RayCast2D" parent="."]
position = Vector2( 8, 10 )
enabled = true
cast_to = Vector2( 0, 10 )
[node name="DecayTimer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
[connection signal="timeout" from="DecayTimer" to="." method="_on_DecayTimer_timeout"]