rudimentary arrow pickup working
This commit is contained in:
@@ -33,13 +33,5 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
func pickup_follow(delta):
|
||||
if follow_target != null:
|
||||
if spawn_out:
|
||||
follow_target.arrow += 1
|
||||
queue_free()
|
||||
else:
|
||||
if global_position.distance_to(follow_target.global_position) < .5:
|
||||
spawn_out = true
|
||||
else:
|
||||
var direction_to_player = global_position.direction_to(follow_target.global_position)
|
||||
var distance_to_player = global_position.distance_to(follow_target.global_position)
|
||||
global_position += global_transform.basis * direction_to_player * (5 + distance_to_player * 3) * delta
|
||||
follow_target.arrows += 1
|
||||
queue_free()
|
||||
|
||||
Reference in New Issue
Block a user