From 11163161762f6488cce50ded09042c1d69cc21a5 Mon Sep 17 00:00:00 2001 From: John Breaux Date: Wed, 24 Nov 2021 03:00:27 -0600 Subject: [PATCH] Player: Yield on signal returns the parameters of that signal. Refactor around this fact. --- godot_ship/script/game/Gameplay/Player.gd | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/godot_ship/script/game/Gameplay/Player.gd b/godot_ship/script/game/Gameplay/Player.gd index 8b87022..4fc6074 100644 --- a/godot_ship/script/game/Gameplay/Player.gd +++ b/godot_ship/script/game/Gameplay/Player.gd @@ -66,12 +66,8 @@ func turn_start(): var fire = Fire.instance() add_child(fire) - yield(fire, "fire_at") - while not fire_at_position: - pass - var target = fire_at_position - fire_at_position = null - return target + var pos = yield(fire, "fire_at") + return pos # getBoard: returns the player's board # returns: board