game: remove old debug prints in attack_sword
This commit is contained in:
@@ -23,12 +23,8 @@ func _ready() -> void:
|
|||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if timer.is_stopped() and current_progress == 0.0:
|
if timer.is_stopped() and current_progress == 0.0:
|
||||||
print_debug("starting timer")
|
|
||||||
timer.start()
|
timer.start()
|
||||||
else:
|
|
||||||
print_debug("timer status: %s\nprogress: %s" % [timer.is_stopped(), current_progress])
|
|
||||||
if current_progress > 0.95:
|
if current_progress > 0.95:
|
||||||
print_debug("reset")
|
|
||||||
reset_attack()
|
reset_attack()
|
||||||
if current_target and is_instance_valid(current_target) and not current_target.is_queued_for_deletion():
|
if current_target and is_instance_valid(current_target) and not current_target.is_queued_for_deletion():
|
||||||
track_target(current_target)
|
track_target(current_target)
|
||||||
@@ -66,14 +62,12 @@ func track_target(body: Node2D):
|
|||||||
var angle_diff = curve_dir.angle_to(desired_dir)
|
var angle_diff = curve_dir.angle_to(desired_dir)
|
||||||
if rotation == 0.0:
|
if rotation == 0.0:
|
||||||
rotation = curve_dir.angle_to(desired_dir)
|
rotation = curve_dir.angle_to(desired_dir)
|
||||||
print_debug("tracked target")
|
|
||||||
position += offset
|
position += offset
|
||||||
|
|
||||||
func _on_timer_timeout() -> void:
|
func _on_timer_timeout() -> void:
|
||||||
if current_target:
|
if current_target:
|
||||||
if trigger_area.has_overlapping_areas():
|
if trigger_area.has_overlapping_areas():
|
||||||
if current_target not in trigger_area.get_overlapping_bodies():
|
if current_target not in trigger_area.get_overlapping_bodies():
|
||||||
print_debug("target out of range")
|
|
||||||
current_target = null
|
current_target = null
|
||||||
return
|
return
|
||||||
if trigger_area.has_overlapping_bodies():
|
if trigger_area.has_overlapping_bodies():
|
||||||
|
Reference in New Issue
Block a user