-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTank.tscn
133 lines (106 loc) · 3.29 KB
/
Tank.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
[gd_scene load_steps=7 format=2]
[ext_resource path="res://Tank.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/onlyObjects_retina.png" type="Texture" id=4]
[sub_resource type="RectangleShape2D" id=1]
custom_solver_bias = 0.0
extents = Vector2( 35.5983, 36.6087 )
[sub_resource type="Animation" id=2]
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 = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/keys = {
"times": PoolRealArray( 0, 0.08, 0.1 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0.425412 ), Color( 1, 1, 1, 0 ) ]
}
[node name="Tank" type="KinematicBody2D"]
position = Vector2( 394.065, 291.39 )
input_pickable = false
collision_layer = 4
collision_mask = 25
collision/safe_margin = 0.08
script = ExtResource( 1 )
_sections_unfolded = [ "Collision", "Transform", "Visibility" ]
__meta__ = {
"_edit_group_": true
}
Bullet = ExtResource( 2 )
speed = 150
rot_speed = 1
damage = 10
start_health = 100
bullet_lifetime = 0.4
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 3 )
region_enabled = true
region_rect = Rect2( 0, 264, 84, 84 )
_sections_unfolded = [ "Region", "Transform" ]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="Turret" type="Sprite" parent="."]
texture = ExtResource( 3 )
offset = Vector2( 23, 0 )
region_enabled = true
region_rect = Rect2( 199, 36, 60, 24 )
_sections_unfolded = [ "Animation", "Offset", "Region", "Transform" ]
[node name="Flash" type="Sprite" parent="Turret"]
modulate = Color( 1, 1, 1, 1.49012e-07 )
position = Vector2( 80, 0 )
rotation = -1.5708
scale = Vector2( 1.1, 1.1 )
z = 6
texture = ExtResource( 4 )
region_enabled = true
region_rect = Rect2( 648, 644, 40, 50 )
_sections_unfolded = [ "Region", "Transform", "Visibility", "Z" ]
[node name="Muzzle" type="Position2D" parent="Turret"]
position = Vector2( 65, 0 )
_sections_unfolded = [ "Transform" ]
[node name="Camera2D" type="Camera2D" parent="."]
anchor_mode = 1
rotating = false
current = true
zoom = Vector2( 1.2, 1.2 )
limit_left = -10000000
limit_top = -10000000
limit_right = 10000000
limit_bottom = 10000000
limit_smoothed = false
drag_margin_h_enabled = true
drag_margin_v_enabled = true
smoothing_enabled = false
smoothing_speed = 5.0
drag_margin_left = 0.2
drag_margin_top = 0.2
drag_margin_right = 0.2
drag_margin_bottom = 0.2
editor_draw_screen = true
editor_draw_limits = true
editor_draw_drag_margin = true
_sections_unfolded = [ "Editor", "Limit" ]
[node name="Bullets" type="Node" parent="."]
[node name="GunTimer" type="Timer" parent="."]
process_mode = 1
wait_time = 0.5
one_shot = false
autostart = false
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
playback_process_mode = 1
playback_default_blend_time = 0.0
root_node = NodePath("..")
anims/MuzzleFlash = SubResource( 2 )
playback/active = true
playback/speed = 0.8
blend_times = [ ]
autoplay = ""
_sections_unfolded = [ "Playback Options", "playback" ]
[connection signal="timeout" from="GunTimer" to="." method="_on_GunTimer_timeout"]