-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenemy.tscn
More file actions
75 lines (60 loc) · 2.27 KB
/
enemy.tscn
File metadata and controls
75 lines (60 loc) · 2.27 KB
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
[gd_scene load_steps=10 format=2]
[ext_resource path="res://enemy.gd" type="Script" id=1]
[ext_resource path="res://Assets/enemies/slimeBlue_blue.png" type="Texture" id=2]
[ext_resource path="res://Assets/enemies/slimeBlue_squashed.png" type="Texture" id=3]
[ext_resource path="res://Assets/enemies/slimeBlue.png" type="Texture" id=4]
[ext_resource path="res://Assets/sounds/pepSound2.ogg" type="AudioStream" id=5]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 4 ), ExtResource( 2 ) ],
"loop": true,
"name": "crawl",
"speed": 3.0
}, {
"frames": [ ExtResource( 3 ) ],
"loop": true,
"name": "squashed",
"speed": 5.0
} ]
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 20, 13.224 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 14.7429, 4.10224 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 26.7638, 10 )
[node name="enemy" type="KinematicBody2D"]
collision_layer = 16
collision_mask = 35
script = ExtResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 1 )
animation = "crawl"
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 1.41423, 4.06587 )
shape = SubResource( 2 )
[node name="floor_checker" type="RayCast2D" parent="."]
position = Vector2( 0, -0.354 )
enabled = true
cast_to = Vector2( 0, 20 )
collision_mask = 2
[node name="top_checker" type="Area2D" parent="."]
collision_layer = 16
collision_mask = 33
[node name="CollisionShape2D" type="CollisionShape2D" parent="top_checker"]
position = Vector2( -0.35356, -13.9654 )
shape = SubResource( 3 )
[node name="sides_checker" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 33
[node name="CollisionShape2D" type="CollisionShape2D" parent="sides_checker"]
position = Vector2( 1.06066, 4.94975 )
shape = SubResource( 4 )
[node name="Timer" type="Timer" parent="."]
wait_time = 0.4
[node name="SoundSquash" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
volume_db = 10.0
[connection signal="body_entered" from="top_checker" to="." method="_on_top_checker_body_entered"]
[connection signal="body_entered" from="sides_checker" to="." method="_on_sides_checker_body_entered"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]