-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnemy.tscn
More file actions
106 lines (91 loc) · 3.51 KB
/
Copy pathEnemy.tscn
File metadata and controls
106 lines (91 loc) · 3.51 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[gd_scene load_steps=22 format=2]
[ext_resource path="res://Player/Enemy/Top/0.png" type="Texture2D" id=1]
[ext_resource path="res://Enemy.gd" type="Script" id=2]
[ext_resource path="res://Player/Enemy/Down/0.png" type="Texture2D" id=3]
[ext_resource path="res://Player/Enemy/Down/2.png" type="Texture2D" id=4]
[ext_resource path="res://Player/Enemy/Left/2.png" type="Texture2D" id=5]
[ext_resource path="res://Player/Enemy/Right/0.png" type="Texture2D" id=6]
[ext_resource path="res://Player/Enemy/Left/0.png" type="Texture2D" id=7]
[ext_resource path="res://Player/Enemy/Top/1.png" type="Texture2D" id=8]
[ext_resource path="res://Player/Enemy/Down/1.png" type="Texture2D" id=9]
[ext_resource path="res://Player/Enemy/Right/1.png" type="Texture2D" id=10]
[ext_resource path="res://Player/Enemy/Top/2.png" type="Texture2D" id=11]
[ext_resource path="res://Player/Enemy/Left/1.png" type="Texture2D" id=12]
[ext_resource path="res://Player/Enemy/Right/2.png" type="Texture2D" id=13]
[ext_resource path="res://Textures/UI/Healthbar/Over.png" type="Texture2D" id=14]
[ext_resource path="res://Textures/UI/Healthbar/Progress.png" type="Texture2D" id=15]
[ext_resource path="res://Textures/UI/Healthbar/Under.png" type="Texture2D" id=16]
[ext_resource path="res://Player/Enemy/Gun/0.png" type="Texture2D" id=17]
[ext_resource path="res://EnemyGun.gd" type="Script" id=18]
[sub_resource type="RectangleShape2D" id=1]
size = Vector2( 5.83939, 5.686 )
[sub_resource type="SpriteFrames" id=2]
animations = [ {
"frames": [ ExtResource( 6 ), ExtResource( 10 ), ExtResource( 13 ) ],
"loop": true,
"name": "Right",
"speed": 5.0
}, {
"frames": [ ExtResource( 7 ), ExtResource( 12 ), ExtResource( 5 ) ],
"loop": true,
"name": "Left",
"speed": 5.0
}, {
"frames": [ ExtResource( 1 ), ExtResource( 8 ), ExtResource( 11 ) ],
"loop": true,
"name": "Top",
"speed": 5.0
}, {
"frames": [ ExtResource( 3 ), ExtResource( 9 ), ExtResource( 4 ) ],
"loop": true,
"name": "Down",
"speed": 5.0
} ]
[sub_resource type="CircleShape2D" id=3]
radius = 39.5338
[node name="Enemy" type="CharacterBody2D"]
script = ExtResource( 2 )
[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2( 0.0701542, -0.438768 )
shape = SubResource( 1 )
[node name="Gun" type="Node2D" parent="."]
script = ExtResource( 18 )
[node name="Texture2D" type="Sprite2D" parent="Gun"]
rotation = 1.5708
texture = ExtResource( 17 )
[node name="BulletPoint" type="Node2D" parent="Gun"]
position = Vector2( 8, 0 )
[node name="Texture2D" type="AnimatedSprite2D" parent="."]
frames = SubResource( 2 )
animation = "Top"
playing = true
[node name="Area2D" type="Area2D" parent="."]
[node name="Collision" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 0, -0.25 )
shape = SubResource( 3 )
[node name="Healthbar" type="TextureProgressBar" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -7.0
offset_top = -13.5
offset_right = 7.0
offset_bottom = -8.5
custom_minimum_size = Vector2( 14, 5 )
value = 100.0
texture_under = ExtResource( 16 )
texture_over = ExtResource( 14 )
texture_progress = ExtResource( 15 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Ticks" type="Timer" parent="."]
wait_time = 1.5
autostart = true
[node name="GunDegrees" type="Timer" parent="."]
wait_time = 0.35
autostart = true
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
[connection signal="timeout" from="Ticks" to="Gun" method="_on_Ticks_timeout"]
[connection signal="timeout" from="GunDegrees" to="." method="_on_GunDegrees_timeout"]