|
10 | 10 | [ext_resource path="res://player/states/die.gd" type="Script" id=8] |
11 | 11 | [ext_resource path="res://player/shadow.png" type="Texture" id=9] |
12 | 12 | [ext_resource path="res://player/body.png" type="Texture" id=10] |
13 | | -[ext_resource path="res://player/weapon/weapon_pivot.gd" type="Script" id=11] |
14 | | -[ext_resource path="res://player/weapon/Sword.tscn" type="PackedScene" id=12] |
15 | | -[ext_resource path="res://player/bullet/bullet_spawner.gd" type="Script" id=13] |
| 13 | +[ext_resource path="res://player/bullet/bullet_spawner.gd" type="Script" id=11] |
| 14 | +[ext_resource path="res://player/weapon/weapon_pivot.gd" type="Script" id=12] |
| 15 | +[ext_resource path="res://player/weapon/Sword.tscn" type="PackedScene" id=13] |
16 | 16 | [ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=14] |
17 | 17 | [ext_resource path="res://player/states/debug/state_name_displayer.gd" type="Script" id=15] |
18 | 18 |
|
@@ -126,45 +126,42 @@ _sections_unfolded = [ "Visibility" ] |
126 | 126 |
|
127 | 127 | [node name="BodyPivot" type="Position2D" parent="." index="3"] |
128 | 128 |
|
129 | | -editor/display_folded = true |
130 | | - |
131 | 129 | [node name="Body" type="Sprite" parent="BodyPivot" index="0"] |
132 | 130 |
|
133 | 131 | position = Vector2( 0, -58.8242 ) |
134 | 132 | texture = ExtResource( 10 ) |
135 | 133 |
|
136 | | -[node name="WeaponPivot" type="Position2D" parent="." index="4"] |
| 134 | +[node name="BulletSpawn" type="Node2D" parent="BodyPivot" index="1"] |
137 | 135 |
|
138 | 136 | editor/display_folded = true |
139 | 137 | position = Vector2( 1.17401, -61.266 ) |
140 | 138 | script = ExtResource( 11 ) |
| 139 | +_sections_unfolded = [ "Transform" ] |
141 | 140 |
|
142 | | -[node name="Offset" type="Position2D" parent="WeaponPivot" index="0"] |
| 141 | +[node name="CooldownTimer" type="Timer" parent="BodyPivot/BulletSpawn" index="0"] |
143 | 142 |
|
144 | | -position = Vector2( 110, 0 ) |
| 143 | +process_mode = 1 |
| 144 | +wait_time = 0.2 |
| 145 | +one_shot = true |
| 146 | +autostart = false |
145 | 147 |
|
146 | | -[node name="Sword" parent="WeaponPivot/Offset" index="0" instance=ExtResource( 12 )] |
| 148 | +[node name="WeaponPivot" type="Position2D" parent="BodyPivot" index="2"] |
147 | 149 |
|
148 | | -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="." index="5"] |
| 150 | +position = Vector2( 1.17401, -61.266 ) |
| 151 | +script = ExtResource( 12 ) |
149 | 152 |
|
150 | | -build_mode = 0 |
151 | | -polygon = PoolVector2Array( -20, 0, -20, -20, 20, -20, 20, 0 ) |
| 153 | +[node name="Offset" type="Position2D" parent="BodyPivot/WeaponPivot" index="0"] |
152 | 154 |
|
153 | | -[node name="BulletSpawn" type="Node2D" parent="." index="6"] |
| 155 | +position = Vector2( 110, 0 ) |
154 | 156 |
|
155 | | -editor/display_folded = true |
156 | | -position = Vector2( 1.17401, -61.266 ) |
157 | | -script = ExtResource( 13 ) |
158 | | -_sections_unfolded = [ "Transform" ] |
| 157 | +[node name="Sword" parent="BodyPivot/WeaponPivot/Offset" index="0" instance=ExtResource( 13 )] |
159 | 158 |
|
160 | | -[node name="CooldownTimer" type="Timer" parent="BulletSpawn" index="0"] |
| 159 | +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="." index="4"] |
161 | 160 |
|
162 | | -process_mode = 1 |
163 | | -wait_time = 0.2 |
164 | | -one_shot = true |
165 | | -autostart = false |
| 161 | +build_mode = 0 |
| 162 | +polygon = PoolVector2Array( -20, 0, -20, -20, 20, -20, 20, 0 ) |
166 | 163 |
|
167 | | -[node name="StateNameDisplayer" type="Label" parent="." index="7"] |
| 164 | +[node name="StateNameDisplayer" type="Label" parent="." index="5"] |
168 | 165 |
|
169 | 166 | editor/display_folded = true |
170 | 167 | anchor_left = 0.0 |
@@ -192,12 +189,12 @@ max_lines_visible = -1 |
192 | 189 | script = ExtResource( 15 ) |
193 | 190 | _sections_unfolded = [ "Rect", "custom_fonts" ] |
194 | 191 |
|
195 | | -[connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"] |
| 192 | +[connection signal="state_changed" from="StateMachine" to="BodyPivot/WeaponPivot/Offset/Sword" method="_on_StateMachine_state_changed"] |
196 | 193 |
|
197 | | -[connection signal="state_changed" from="StateMachine" to="WeaponPivot/Offset/Sword" method="_on_StateMachine_state_changed"] |
| 194 | +[connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"] |
198 | 195 |
|
199 | 196 | [connection signal="animation_finished" from="AnimationPlayer" to="StateMachine" method="_on_animation_finished"] |
200 | 197 |
|
201 | | -[connection signal="attack_finished" from="WeaponPivot/Offset/Sword" to="StateMachine/Attack" method="_on_Sword_attack_finished"] |
| 198 | +[connection signal="attack_finished" from="BodyPivot/WeaponPivot/Offset/Sword" to="StateMachine/Attack" method="_on_Sword_attack_finished"] |
202 | 199 |
|
203 | 200 |
|
0 commit comments