Attack animation

added auto fill buttons on the menu
This commit is contained in:
Twirpytherobot
2025-11-12 19:51:47 +00:00
parent bc30cfd6ca
commit c077bd37a7
7 changed files with 96 additions and 24 deletions
+8
View File
@@ -179,8 +179,16 @@ func _perform_attack():
if not is_multiplayer_authority() or is_dead:
return
# Don't attack if already attacking
if _body and _body.animation_player and _body.animation_player.current_animation == "Attack1":
return
_attack_timer = attack_cooldown
# Play attack animation once
if _body:
_body.play_attack()
# Find nearest enemy in range
var space_state = get_world_3d().direct_space_state
var query = PhysicsShapeQueryParameters3D.new()