1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2024-11-14 21:15:58 +00:00

Player: Yield on signal returns the parameters of that signal. Refactor around this fact.

This commit is contained in:
John 2021-11-24 03:00:27 -06:00
parent 66cac5247f
commit 1116316176

View File

@ -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