-
Notifications
You must be signed in to change notification settings - Fork 0
/
soldier_command.tscn
113 lines (95 loc) · 4.04 KB
/
soldier_command.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
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
107
108
109
110
111
112
113
[gd_scene load_steps=19 format=2]
[ext_resource path="res://soldier_command.gd" type="Script" id=1]
[ext_resource path="res://resource/enemies/soldier/ship_left.png" type="Texture" id=2]
[ext_resource path="res://resource/enemies/soldier/step_back.png" type="Texture" id=3]
[ext_resource path="res://resource/enemies/soldier/speed3.png" type="Texture" id=4]
[ext_resource path="res://resource/enemies/soldier/speed1.png" type="Texture" id=5]
[ext_resource path="res://resource/enemies/soldier/ship_right.png" type="Texture" id=6]
[ext_resource path="res://resource/enemies/soldier/speed12.png" type="Texture" id=7]
[ext_resource path="res://explotion_sprite.tscn" type="PackedScene" id=8]
[ext_resource path="res://explotion.tscn" type="PackedScene" id=9]
[ext_resource path="res://ship_collision.tscn" type="PackedScene" id=10]
[ext_resource path="res://ship_collision_animation.tscn" type="PackedScene" id=11]
[ext_resource path="res://direction_collision.tscn" type="PackedScene" id=12]
[ext_resource path="res://life_tag.tscn" type="PackedScene" id=13]
[ext_resource path="res://target_detection.tscn" type="PackedScene" id=14]
[ext_resource path="res://head_east.tscn" type="PackedScene" id=17]
[ext_resource path="res://radar.tscn" type="PackedScene" id=32]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 2 ) ],
"loop": false,
"name": "desplace_left",
"speed": 5.0
}, {
"frames": [ ExtResource( 6 ) ],
"loop": true,
"name": "desplace_right",
"speed": 5.0
}, {
"frames": [ ExtResource( 5 ), ExtResource( 7 ) ],
"loop": true,
"name": "speed1",
"speed": 100.0
}, {
"frames": [ ExtResource( 4 ) ],
"loop": true,
"name": "speed3",
"speed": 5.0
}, {
"frames": [ ExtResource( 3 ) ],
"loop": true,
"name": "step_back",
"speed": 5.0
} ]
[sub_resource type="CapsuleShape2D" id=2]
radius = 27.0
height = 0.0
[node name="enemy_soldier" type="Area2D"]
collision_layer = 4
collision_mask = 63
script = ExtResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( -0.483826, 0 )
scale = Vector2( 0.151062, 0.118333 )
frames = SubResource( 1 )
animation = "speed1"
frame = 1
playing = true
offset = Vector2( -133, 0 )
flip_v = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="explotion_animation" parent="." instance=ExtResource( 9 )]
[node name="explotion" parent="." instance=ExtResource( 8 )]
[node name="ship_collision_animation" parent="." instance=ExtResource( 11 )]
[node name="ship_collision" parent="." instance=ExtResource( 10 )]
frame = 0
[node name="head" parent="." instance=ExtResource( 17 )]
position = Vector2( 38, 0 )
[node name="radar" parent="." instance=ExtResource( 32 )]
position = Vector2( 1, 0 )
collision_mask = 4111
[node name="attack_rate" type="Timer" parent="."]
wait_time = 0.5
autostart = true
[node name="direction_collision" parent="." instance=ExtResource( 12 )]
[node name="life_tag" parent="." instance=ExtResource( 13 )]
position = Vector2( -18, -37 )
[node name="target_detection" parent="." instance=ExtResource( 14 )]
wait_time = 1.0
[node name="shot_eye" type="RayCast2D" parent="."]
rotation = -1.5708
enabled = true
cast_to = Vector2( 0, 500 )
collision_mask = 4127
collide_with_areas = true
collide_with_bodies = false
[connection signal="area_entered" from="." to="." method="_on_enemy_soldier_area_entered"]
[connection signal="animation_finished" from="explotion_animation" to="." method="_on_explotion_animation_animation_finished"]
[connection signal="animation_finished" from="ship_collision_animation" to="." method="_on_ship_collision_animation_animation_finished"]
[connection signal="area_entered" from="radar" to="." method="_on_radar_area_entered"]
[connection signal="area_exited" from="radar" to="." method="_on_radar_area_exited"]
[connection signal="timeout" from="attack_rate" to="." method="_on_attack_rate_timeout"]
[connection signal="restart_position" from="direction_collision" to="." method="_on_direction_collision_restart_position"]
[connection signal="timeout" from="target_detection" to="." method="_on_target_detection_timeout"]