Attack animation
added auto fill buttons on the menu
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user