Removed reloaders from Cannon, Minelayer and Tesla

This commit is contained in:
2025-11-21 17:44:05 +03:00
parent 144e259656
commit a5c60c2491
7 changed files with 41 additions and 30 deletions
@@ -2,9 +2,23 @@ extends AbstractWeapon
@onready var sprite : AnimatedSprite2D = $AnimatedSprite2D
@onready var cooldown_timer : Timer = $CooldownTimer
func set_belonging(belonging: Belonging) -> void:
super.set_belonging(belonging)
sprite.play(PREFIXES[_belonging] + IDLE_POSTFIX)
func shoot(ship_velocity: Vector2) -> bool:
var is_shot := super.shoot(ship_velocity)
if is_shot:
_can_shoot = false
cooldown_timer.start()
return is_shot
func _on_cooldown_timer_timeout() -> void:
_can_shoot = true