Reworked other weapons

This commit is contained in:
2025-11-26 21:29:57 +03:00
parent c3c199a9f9
commit 79d942b803
20 changed files with 74 additions and 76 deletions
@@ -6,12 +6,12 @@ extends AbstractWeapon
@onready var cooldown_timer : Timer = $CooldownTimer
@onready var particles : Array[GPUParticles2D] = [
$RightParticles, $LeftParticles,
$LeftParticles, $RightParticles,
]
var _particles_index := 0
@onready var muzzles : Array[Node2D] = [
$RightMuzzle, $LeftMuzzle,
$Muzzle, $SecondMuzzle,
]
var _muzzle_index := 0
@@ -48,7 +48,7 @@ func _restart_particles() -> void:
func _get_projectile_position() -> Vector2:
var projectile_position := muzzles[_muzzle_index].position
var projectile_position := muzzles[_muzzle_index].global_position - global_position
_muzzle_index += 1
if _muzzle_index >= muzzles.size():
_muzzle_index = 0
@@ -78,10 +78,10 @@ texture = SubResource("AtlasTexture_ylgjm")
wait_time = 0.5
one_shot = true
[node name="LeftMuzzle" type="Node2D" parent="." index="5"]
position = Vector2(12, -3)
[node name="Muzzle" parent="." index="5"]
position = Vector2(11, -3)
[node name="RightMuzzle" type="Node2D" parent="." index="6"]
position = Vector2(12, 3)
[node name="SecondMuzzle" type="Node2D" parent="." index="6"]
position = Vector2(11, 3)
[connection signal="timeout" from="CooldownTimer" to="." method="_on_cooldown_timer_timeout"]