-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Cannon.tscn
164 lines (128 loc) · 3.89 KB
/
Cannon.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
[gd_scene load_steps=9 format=2]
[ext_resource path="res://Enemy.gd" type="Script" id=1]
[ext_resource path="res://Bullet.tscn" type="PackedScene" id=2]
[ext_resource path="res://art/onlyObjects_retina_rotated.png" type="Texture" id=3]
[ext_resource path="res://art/ui/barGreen_horizontalMid.png" type="Texture" id=4]
[ext_resource path="res://Explosion.tscn" type="PackedScene" id=5]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 22.1197
[sub_resource type="CircleShape2D" id=2]
custom_solver_bias = 0.0
radius = 400.0
[sub_resource type="Animation" id=3]
resource_name = "MuzzleFlash"
length = 0.1
loop = false
step = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath("Turret/Flash:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/keys = {
"times": PoolRealArray( 0, 0.01, 0.08, 0.1 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
[node name="Cannon" type="KinematicBody2D" groups=[
"enemies",
]]
input_pickable = false
collision_layer = 16
collision_mask = 29
collision/safe_margin = 0.08
script = ExtResource( 1 )
_sections_unfolded = [ "Collision", "collision" ]
Bullet = ExtResource( 2 )
speed = null
turret_speed = 2.0
bullet_type = "black"
detect_radius = 500
damage = 20
start_health = 40
bullet_lifetime = 0.6
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 3 )
region_enabled = true
region_rect = Rect2( 532, 130, 56, 56 )
_sections_unfolded = [ "Region" ]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
shape = SubResource( 1 )
[node name="Turret" type="Sprite" parent="."]
texture = ExtResource( 3 )
offset = Vector2( 12, 0 )
region_enabled = true
region_rect = Rect2( 644, 70, 48, 24 )
_sections_unfolded = [ "Offset", "Region", "Transform" ]
[node name="Muzzle" type="Position2D" parent="Turret"]
position = Vector2( 40, 0 )
_sections_unfolded = [ "Transform" ]
[node name="Flash" type="Sprite" parent="Turret"]
modulate = Color( 1, 1, 1, 0 )
scale = Vector2( 1.2, 1.2 )
z = 6
texture = ExtResource( 3 )
offset = Vector2( 64, 0 )
region_enabled = true
region_rect = Rect2( 535, 18, 52, 16 )
_sections_unfolded = [ "Offset", "Region", "Transform", "Visibility", "Z" ]
[node name="GunTimer" type="Timer" parent="."]
process_mode = 1
wait_time = 0.75
one_shot = true
autostart = false
[node name="Detect" type="Area2D" parent="."]
input_pickable = true
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
audio_bus_override = false
audio_bus_name = "Master"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Detect"]
shape = SubResource( 2 )
[node name="Bullets" type="Node" parent="."]
[node name="HealthBar" type="Node2D" parent="."]
[node name="Bar" type="TextureProgress" parent="HealthBar"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = -24.0
margin_top = -60.0
margin_right = 40.0
margin_bottom = -20.0
rect_pivot_offset = Vector2( 24, 60 )
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 1
size_flags_vertical = 1
min_value = 0.0
max_value = 100.0
step = 1.0
page = 0.0
value = 75.0
exp_edit = false
rounded = false
texture_under = null
texture_over = null
texture_progress = ExtResource( 4 )
radial_fill_degrees = 360.0
radial_center_offset = Vector2( 0, 0 )
nine_patch_stretch = false
_sections_unfolded = [ "Rect", "Textures" ]
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
playback_process_mode = 1
playback_default_blend_time = 0.0
root_node = NodePath("..")
anims/MuzzleFlash = SubResource( 3 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = ""
[node name="Explosion" parent="." instance=ExtResource( 5 )]
visible = false
[connection signal="animation_finished" from="Explosion" to="." method="_on_Explosion_animation_finished"]