-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplayer.tscn
241 lines (202 loc) · 8.73 KB
/
player.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
[gd_scene load_steps=49 format=1]
[ext_resource path="res://player.gd" type="Script" id=1]
[ext_resource path="res://blood.png" type="Texture" id=2]
[ext_resource path="res://anims/warr/idle/0.png" type="Texture" id=3]
[ext_resource path="res://anims/warr/idle/1.png" type="Texture" id=4]
[ext_resource path="res://anims/warr/idle/2.png" type="Texture" id=5]
[ext_resource path="res://anims/warr/idle/3.png" type="Texture" id=6]
[ext_resource path="res://anims/warr/idle/4.png" type="Texture" id=7]
[ext_resource path="res://anims/warr/idle/5.png" type="Texture" id=8]
[ext_resource path="res://anims/warr/idle/6.png" type="Texture" id=9]
[ext_resource path="res://anims/warr/idle/7.png" type="Texture" id=10]
[ext_resource path="res://anims/warr/idle/8.png" type="Texture" id=11]
[ext_resource path="res://anims/warr/idle/9.png" type="Texture" id=12]
[ext_resource path="res://anims/warr/die/0.png" type="Texture" id=13]
[ext_resource path="res://anims/warr/die/1.png" type="Texture" id=14]
[ext_resource path="res://anims/warr/die/2.png" type="Texture" id=15]
[ext_resource path="res://anims/warr/die/3.png" type="Texture" id=16]
[ext_resource path="res://anims/warr/die/4.png" type="Texture" id=17]
[ext_resource path="res://anims/warr/die/5.png" type="Texture" id=18]
[ext_resource path="res://anims/warr/die/6.png" type="Texture" id=19]
[ext_resource path="res://anims/warr/die/7.png" type="Texture" id=20]
[ext_resource path="res://anims/warr/die/8.png" type="Texture" id=21]
[ext_resource path="res://anims/warr/die/9.png" type="Texture" id=22]
[ext_resource path="res://anims/warr/attack/0.png" type="Texture" id=23]
[ext_resource path="res://anims/warr/attack/1.png" type="Texture" id=24]
[ext_resource path="res://anims/warr/attack/2.png" type="Texture" id=25]
[ext_resource path="res://anims/warr/attack/3.png" type="Texture" id=26]
[ext_resource path="res://anims/warr/attack/4.png" type="Texture" id=27]
[ext_resource path="res://anims/warr/attack/5.png" type="Texture" id=28]
[ext_resource path="res://anims/warr/attack/6.png" type="Texture" id=29]
[ext_resource path="res://anims/warr/attack/7.png" type="Texture" id=30]
[ext_resource path="res://anims/warr/attack/8.png" type="Texture" id=31]
[ext_resource path="res://anims/warr/attack/9.png" type="Texture" id=32]
[ext_resource path="res://anims/warr/walk/0.png" type="Texture" id=33]
[ext_resource path="res://anims/warr/walk/1.png" type="Texture" id=34]
[ext_resource path="res://anims/warr/walk/2.png" type="Texture" id=35]
[ext_resource path="res://anims/warr/walk/3.png" type="Texture" id=36]
[ext_resource path="res://anims/warr/walk/4.png" type="Texture" id=37]
[ext_resource path="res://anims/warr/walk/5.png" type="Texture" id=38]
[ext_resource path="res://anims/warr/walk/6.png" type="Texture" id=39]
[ext_resource path="res://anims/warr/walk/7.png" type="Texture" id=40]
[ext_resource path="res://anims/warr/walk/8.png" type="Texture" id=41]
[ext_resource path="res://anims/warr/walk/9.png" type="Texture" id=42]
[ext_resource path="res://spot.png" type="Texture" id=43]
[ext_resource path="res://bloodbar/bar_under_low_res.png" type="Texture" id=44]
[ext_resource path="res://bloodbar/progress_low_res.png" type="Texture" id=45]
[sub_resource type="ConvexPolygonShape2D" id=1]
custom_solver_bias = 0.0
points = Vector2Array( -4, 13, 4, 13, 4, 16, -4, 16 )
[sub_resource type="ConvexPolygonShape2D" id=2]
custom_solver_bias = 0.0
points = Vector2Array( 8.67797, -6.4, 8.67797, 19.2, -8.67797, 19.2, -8.67797, -6.4 )
[sub_resource type="SpriteFrames" id=3]
animations = [ { "frames":[ ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ) ], "loop":false, "name":"idle", "speed":5.0 }, { "frames":[ ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 18 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 21 ), ExtResource( 22 ) ], "loop":false, "name":"die", "speed":5.0 }, { "frames":[ ExtResource( 23 ), ExtResource( 24 ), ExtResource( 25 ), ExtResource( 26 ), ExtResource( 27 ), ExtResource( 28 ), ExtResource( 29 ), ExtResource( 30 ), ExtResource( 31 ), ExtResource( 32 ) ], "loop":false, "name":"attack", "speed":20.0 }, { "frames":[ ExtResource( 33 ), ExtResource( 34 ), ExtResource( 35 ), ExtResource( 36 ), ExtResource( 37 ), ExtResource( 38 ), ExtResource( 39 ), ExtResource( 40 ), ExtResource( 41 ), ExtResource( 42 ) ], "loop":true, "name":"walk", "speed":15.0 } ]
[node name="player" type="KinematicBody2D" groups=[ "player" ]]
input/pickable = false
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 9.53674e-07 )
shapes/0/trigger = false
collision/layers = 1
collision/mask = 1
collision/margin = 0.08
script/script = ExtResource( 1 )
__meta__ = { "_edit_lock_":true }
[node name="Particles2D" type="Particles2D" parent="."]
transform/pos = Vector2( 0, 8 )
config/amount = 60
config/lifetime = 1.0
config/emit_timeout = 0.2
config/emitting = false
config/texture = ExtResource( 2 )
params/direction = 110.0
params/spread = 40.0
params/linear_velocity = 80.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 0.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 0.0
params/initial_angle = 0.0
params/initial_size = 1.0
params/final_size = 0.5
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
__meta__ = { "_edit_lock_":true }
[node name="Area2D" type="Area2D" parent="."]
transform/scale = Vector2( 0.921875, 1.25 )
input/pickable = true
shapes/0/shape = SubResource( 2 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 18.678, -6.8 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
__meta__ = { "_edit_lock_":true }
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Area2D"]
transform/pos = Vector2( 18.678, -6.8 )
build_mode = 0
polygon = Vector2Array( -8.67797, -6.4, -8.67797, 19.2, 8.67797, 19.2, 8.67797, -6.4 )
shape_range = Vector2( 0, 0 )
trigger = false
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 3 )
animation = "walk"
__meta__ = { "_edit_lock_":true }
[node name="camera" type="Camera2D" parent="."]
anchor_mode = 1
rotating = false
current = true
zoom = Vector2( 0.25, 0.25 )
limit/left = -10000000
limit/top = -10000000
limit/right = 10000000
limit/bottom = 10000000
drag_margin/h_enabled = false
drag_margin/v_enabled = false
smoothing/enable = true
smoothing/speed = 2.0
drag_margin/left = 0.2
drag_margin/top = 0.2
drag_margin/right = 0.2
drag_margin/bottom = 0.2
__meta__ = { "_edit_lock_":true }
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
transform/pos = Vector2( 0, 9.53674e-07 )
build_mode = 0
polygon = Vector2Array( -4, 13, 4, 13, 4, 16, -4, 16 )
shape_range = Vector2( 0, 0 )
trigger = false
[node name="Light2D" type="Light2D" parent="."]
visibility/visible = false
transform/pos = Vector2( 0, -6 )
enabled = true
editor_only = false
texture = ExtResource( 43 )
offset = Vector2( 0, 9 )
scale = 1.3
color = Color( 1, 1, 1, 1 )
energy = 0.67
mode = 0
range/height = 0.0
range/z_min = -1024
range/z_max = 1024
range/layer_min = 0
range/layer_max = 0
range/item_mask = 1
shadow/enabled = true
shadow/color = Color( 0, 0, 0, 0 )
shadow/buffer_size = 2048
shadow/esm_multiplier = 1.0
shadow/item_mask = 1
[node name="idle_timer" type="Timer" parent="."]
process_mode = 1
wait_time = 3.0
one_shot = false
autostart = true
[node name="hit_timer" type="Timer" parent="."]
process_mode = 1
wait_time = 0.35
one_shot = true
autostart = false
[node name="DeathTimer" type="Timer" parent="."]
process_mode = 1
wait_time = 5.0
one_shot = true
autostart = false
[node name="HUD" type="CanvasLayer" parent="."]
layer = 1
offset = Vector2( 0, 0 )
rotation = 0.0
scale = Vector2( 1, 1 )
[node name="HealthBar" type="TextureProgress" parent="HUD"]
anchor/top = 1
rect/scale = Vector2( 5, 5 )
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 20.0
margin/top = 60.0
margin/right = 0.0
margin/bottom = 0.0
range/min = 0.0
range/max = 100.0
range/step = 1.0
range/page = 0.0
range/value = 1.0
range/exp_edit = false
range/rounded = false
texture/under = ExtResource( 44 )
texture/over = null
texture/progress = ExtResource( 45 )
radial_fill/fill_degrees = 360.0
radial_fill/center_offset = Vector2( 0, 0 )
[connection signal="finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_finished"]
[connection signal="timeout" from="idle_timer" to="." method="_on_idle_timer_timeout"]
[connection signal="timeout" from="hit_timer" to="." method="_on_hit_timer_timeout"]
[connection signal="timeout" from="DeathTimer" to="." method="_on_DeathTimer_timeout"]