Added autoshooting

This commit is contained in:
2025-11-29 21:32:36 +03:00
parent 67342c82cc
commit f42139ef9c
7 changed files with 12 additions and 42 deletions
@@ -22,12 +22,6 @@ func _add_weapon(weapon: AbstractWeapon, weapon_position: Vector2) -> void:
weapon.set_belonging(AbstractWeapon.Belonging.PLAYER)
func _on_player_controller_shoot(weapon_index: int) -> void:
if weapon_index >= _weapons.size(): return
_weapons[weapon_index].shoot(velocity)
func _blink(direction: Vector2) -> void:
if not blink_timer.is_stopped(): return
+2 -2
View File
@@ -61,10 +61,10 @@ one_shot = true
emitting = false
amount = 2
texture = SubResource("AtlasTexture_34rhw")
lifetime = 0.09999999999999999
lifetime = 0.1
one_shot = true
process_material = SubResource("ParticleProcessMaterial_pjmi2")
[connection signal="accelerate" from="PlayerController" to="." method="accelerate"]
[connection signal="blink" from="PlayerController" to="." method="_blink"]
[connection signal="shoot" from="PlayerController" to="." method="_on_player_controller_shoot"]
[connection signal="shoot" from="PlayerController" to="." method="shoot"]