-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnemy.tscn
36 lines (27 loc) · 1.06 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
[gd_scene load_steps=6 format=2]
[ext_resource path="res://Assets/enemy.png" type="Texture" id=1]
[ext_resource path="res://Enemy.gd" type="Script" id=2]
[ext_resource path="res://Sounds/death.wav" type="AudioStream" id=3]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 3, 2.5 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 3, 2.5 )
[node name="Enemy" type="KinematicBody2D"]
collision_layer = 4
collision_mask = 3
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
position = Vector2( 0, 1.5 )
shape = SubResource( 1 )
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 16
collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2( 0, 1.5 )
shape = SubResource( 2 )
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]